:root {
  --bg: #101a2a;
  --sidebar: #111827;
  --sidebar-2: #0c1220;
  --panel: #0b3b58;
  --panel-dark: #122238;
  --tile: #172a42;
  --blue: #2f8cff;
  --blue-2: #1f9bff;
  --cyan: #22d3ee;
  --text: #dcecff;
  --muted: #a9b7cc;
  --border: rgba(47, 140, 255, .22);
  --shadow: 0 0 24px rgba(14, 165, 255, .20);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  background: linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
  border-right: 1px solid rgba(255,255,255,.06);
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.side-profile {
  height: 100px;
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.side-profile img {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  object-fit: cover;
  background: #0b1220;
}

.side-profile strong {
  display: block;
  font-size: 15px;
}

.side-profile span {
  color: var(--muted);
  font-size: 13px;
}

.side-nav {
  padding: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.side-nav a,
.logout-link {
  min-height: 52px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: #aeb9cb;
  font-weight: 700;
  font-size: 15px;
  border-left: 4px solid transparent;
  transition: .16s ease;
}

.side-nav a:hover,
.side-nav a.active {
  color: white;
  background: rgba(47, 140, 255, .12);
  border-left-color: var(--blue-2);
}

.logout-link {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,.07);
}

.app-shell {
  margin-left: 260px;
  min-height: 100vh;
  padding: 22px;
  background:
    radial-gradient(circle at top left, rgba(14,165,255,.16), transparent 34%),
    linear-gradient(180deg, #132236, #101a2a);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(14,165,255,.20), transparent 34%),
    linear-gradient(180deg, #132236, #101a2a);
}

.auth-card {
  width: min(460px, 100%);
  padding: 28px;
  border-radius: 24px;
  background: #0b3b58;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.auth-brand {
  text-align: center;
  margin-bottom: 24px;
}

.brand-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), #7c5cff);
  box-shadow: 0 0 28px rgba(47,140,255,.45);
}

.auth-brand h1 {
  margin: 0;
  font-size: 34px;
}

.auth-brand p,
.auth-help {
  color: var(--muted);
}

.auth-help {
  text-align: center;
}

.auth-help a {
  color: #7cc8ff;
  font-weight: 900;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form label {
  color: #bcd0e8;
  font-weight: 800;
  font-size: 14px;
}

.auth-form input {
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: #132238;
  color: white;
  outline: none;
}

.btn {
  border: 0;
  cursor: pointer;
  padding: 13px 18px;
  border-radius: 14px;
  color: white;
  font-weight: 900;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  transition: .2s ease;
}

.btn.primary {
  background: linear-gradient(135deg, var(--blue-2), #7c5cff);
}

.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.alert {
  padding: 14px;
  border-radius: 14px;
  margin-bottom: 16px;
}

.alert.danger {
  background: rgba(251, 54, 93, .14);
  border: 1px solid rgba(251,54,93,.32);
}

.alert.success {
  background: rgba(34, 197, 94, .14);
  border: 1px solid rgba(34,197,94,.32);
}

.dashboard-grid {
  max-width: 1580px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.25fr .58fr 1.15fr;
  grid-template-rows: 380px 250px;
  gap: 20px;
}

.panel-card {
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid rgba(47, 140, 255, .18);
  box-shadow: var(--shadow);
  padding: 20px;
  overflow: hidden;
}

.panel-title {
  min-height: 64px;
  border-radius: 14px 14px 0 0;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cfe6ff;
  font-weight: 900;
  font-size: 20px;
  margin: 0 0 20px;
}

.user-info-content {
  display: grid;
  grid-template-columns: 210px 1fr 1fr;
  gap: 18px;
  align-items: stretch;
}

.big-avatar {
  grid-row: span 2;
  min-height: 245px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #092f49;
}

.big-avatar img {
  width: 128px;
  height: 128px;
  border-radius: 999px;
  object-fit: cover;
}

.info-tile {
  min-height: 112px;
  padding: 18px;
  border-radius: 10px;
  background: var(--tile);
  display: grid;
  place-items: center;
  text-align: center;
}

.info-tile span {
  color: var(--blue-2);
  font-weight: 900;
}

.info-tile strong {
  font-size: 15px;
  font-weight: 500;
  word-break: break-word;
}

.blue-card {
  background: var(--blue);
  color: #073052;
  display: grid;
  place-items: center;
  text-align: center;
}

.metric-icon {
  font-size: 38px;
  color: #073052;
}

.metric-card span {
  color: #d7eaff;
  font-size: 17px;
}

.metric-card strong {
  font-size: 44px;
  font-weight: 500;
  color: #073052;
}

.metric-card p {
  color: #e6f2ff;
  margin: 0;
}

.rank-tiles {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  min-height: 150px;
}

.rank-tiles .info-tile {
  min-width: 126px;
}

.rank-tiles.compact {
  min-height: 120px;
}

.empty-center {
  text-align: center;
  color: #cbd5e1;
  font-size: 17px;
  margin-top: 26px;
}

.last-skin-content {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
  min-height: 130px;
}

.last-skin-content img {
  width: 180px;
  height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 0 22px rgba(47,140,255,.35));
}

.last-skin-content strong,
.last-skin-content span,
.last-skin-content small {
  display: block;
}

.placeholder-page {
  min-height: calc(100vh - 44px);
}

.page-head {
  max-width: 1300px;
  margin: 0 auto 22px;
}

.page-head h1,
h1 {
  margin: 0 0 12px;
  font-size: clamp(46px, 6vw, 80px);
  line-height: .95;
}

.page-head p,
p {
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 20px;
}

.cases-grid,
.cards-grid {
  max-width: 1300px;
  margin: 0 auto;
  grid-template-columns: repeat(auto-fit, minmax(280px, 340px));
  justify-content: center;
}

.case-opening {
  max-width: 1300px;
  margin: 0 auto 22px;
  border-radius: 16px;
  background: #122238;
  border: 1px solid rgba(47,140,255,.20);
  padding: 20px;
}

.roulette-wrap {
  position: relative;
  overflow: hidden;
  height: 190px;
  border-radius: 15px;
  background: #060d1d;
  border: 1px solid rgba(255,255,255,.06);
}

.roulette-marker {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, #fbbf24, transparent);
  box-shadow: 0 0 24px rgba(251, 191, 36, .85);
}

.roulette {
  display: flex;
  gap: 12px;
  align-items: center;
  height: 100%;
  padding: 16px;
  transition: transform 5.4s cubic-bezier(.08,.72,.12,1);
}

.roulette-placeholder {
  width: 100%;
  text-align: center;
  color: var(--muted);
}

.roulette-item {
  min-width: 160px;
  height: 150px;
  border-radius: 14px;
  border: 1px solid rgba(125,211,252,.16);
  background: #172a42;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.roulette-item img {
  width: 125px;
  height: 86px;
  object-fit: contain;
}

.roulette-item span {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: 0 8px;
}

.roulette-item small {
  font-size: 11px;
  color: #7cc8ff;
}

.case-card,
.skin-card,
.shop-card,
.admin-box,
.empty {
  padding: 20px;
  background: #122238;
  border: 1px solid rgba(47,140,255,.20);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.case-card {
  min-height: 380px;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.case-card img {
  height: 155px;
  width: 100%;
  object-fit: contain;
  margin: 0 auto 12px;
}

.case-card h3 {
  min-height: 44px;
}

.case-card .btn {
  width: 100%;
  margin-top: auto;
}

.skin-card img {
  width: 100%;
  height: 145px;
  object-fit: contain;
}

.skin-meta {
  font-size: 13px;
}

.rare-special-card {
  border-color: rgba(251, 191, 36, .55);
  background: radial-gradient(circle at center, rgba(251,191,36,.16), transparent 58%), #172a42;
}

.rare-mystery {
  width: 92px;
  height: 82px;
  position: relative;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
}

.rare-question {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  font-size: 48px;
  font-weight: 1000;
  color: #fbbf24;
  background: rgba(2,6,23,.8);
  border: 1px solid rgba(251,191,36,.42);
  text-shadow: 0 0 24px rgba(251,191,36,.9);
  z-index: 2;
}

.rare-glow {
  position: absolute;
  inset: 8px;
  border-radius: 999px;
  background: rgba(251,191,36,.35);
  filter: blur(18px);
  z-index: 1;
}

@media (max-width: 1180px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .user-info-content {
    grid-template-columns: 1fr 1fr;
  }

  .big-avatar {
    grid-column: span 2;
    grid-row: auto;
  }
}

@media (max-width: 760px) {
  .sidebar {
    width: 74px;
  }

  .side-profile {
    padding: 14px;
  }

  .side-profile div,
  .side-nav span,
  .logout-link span {
    display: none;
  }

  .app-shell {
    margin-left: 74px;
    padding: 14px;
  }

  .user-info-content {
    grid-template-columns: 1fr;
  }

  .big-avatar {
    grid-column: auto;
  }

  .rank-tiles {
    flex-wrap: wrap;
  }

  .cases-grid,
  .cards-grid {
    grid-template-columns: 1fr;
  }
}

/* Buy Crates page */
.wallet-bar {
  max-width: 1300px;
  margin: 0 auto 22px;
  padding: 18px 22px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(47, 140, 255, .22), rgba(124, 92, 255, .12)),
    #122238;
  border: 1px solid rgba(47,140,255,.28);
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wallet-bar span {
  color: var(--muted);
  display: block;
  font-weight: 800;
}

.wallet-bar strong {
  font-size: 34px;
  color: #7cc8ff;
}

.btn.ghost {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
}

.shop-alert {
  max-width: 1300px;
  margin: 0 auto 18px;
  padding: 14px 18px;
  border-radius: 14px;
  font-weight: 800;
}

.shop-alert.success {
  background: rgba(34, 197, 94, .14);
  border: 1px solid rgba(34,197,94,.32);
  color: #bbf7d0;
}

.shop-alert.danger {
  background: rgba(251, 54, 93, .14);
  border: 1px solid rgba(251,54,93,.32);
  color: #fecdd3;
}

.crate-shop-grid {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.buy-crate-card {
  position: relative;
  overflow: hidden;
  min-height: 365px;
  padding: 20px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 12%, rgba(34, 211, 238, .18), transparent 35%),
    linear-gradient(180deg, #142842, #0f1b2f);
  border: 1px solid rgba(47,140,255,.22);
  box-shadow: 0 0 24px rgba(14,165,255,.14);
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.buy-crate-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34,211,238,.42);
  box-shadow: 0 0 34px rgba(14,165,255,.24);
}

.crate-image-box {
  height: 155px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}

.crate-image-box img {
  width: 100%;
  height: 145px;
  object-fit: contain;
  filter: drop-shadow(0 0 24px rgba(34,211,238,.22));
}

.crate-placeholder {
  width: 110px;
  height: 110px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: rgba(47,140,255,.12);
  color: #7cc8ff;
  font-size: 44px;
}

.crate-info h3 {
  min-height: 48px;
  margin: 0 0 14px;
  text-align: center;
  font-size: 18px;
}

.crate-price {
  padding: 14px;
  border-radius: 14px;
  background: rgba(2,6,23,.32);
  border: 1px solid rgba(255,255,255,.07);
  text-align: center;
}

.crate-price span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.crate-price strong {
  color: #f8fafc;
  font-size: 18px;
}

.buy-crate-form {
  margin-top: auto;
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 10px;
  padding-top: 16px;
}

.buy-crate-form select {
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  background: #0b1220;
  color: white;
  padding: 0 10px;
  font-weight: 900;
}

.buy-crate-form button:disabled {
  opacity: .35;
}

@media (max-width: 760px) {
  .wallet-bar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .crate-shop-grid {
    grid-template-columns: 1fr;
  }
}

/* Premium layout refresh */
.sapphire-page-head {
  max-width: 1500px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.opening-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
}

.opening-top h2 {
  margin: 0 0 6px;
}

.opening-top p {
  margin: 0;
}

.opening-result {
  min-width: 280px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(2, 6, 23, .35);
  border: 1px solid rgba(255,255,255,.08);
  color: #cfe6ff;
  font-weight: 800;
  text-align: center;
}

.premium-grid {
  max-width: 1500px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

.premium-crate-card,
.premium-skin-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(34, 211, 238, .18), transparent 38%),
    linear-gradient(180deg, rgba(20, 40, 66, .96), rgba(10, 18, 33, .98));
  border: 1px solid rgba(47, 140, 255, .24);
  box-shadow: 0 0 28px rgba(14, 165, 255, .13);
}

.premium-crate-card {
  min-height: 392px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.premium-crate-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, .48);
  box-shadow: 0 0 38px rgba(14, 165, 255, .24);
}

.disabled-crate {
  opacity: .55;
}

.crate-amount-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  min-width: 54px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(47, 140, 255, .20);
  border: 1px solid rgba(124, 200, 255, .30);
  color: #dff3ff;
  font-weight: 1000;
  text-align: center;
  z-index: 3;
}

.premium-crate-image {
  height: 168px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}

.premium-crate-image img {
  width: 100%;
  height: 158px;
  object-fit: contain;
  filter: drop-shadow(0 0 28px rgba(34, 211, 238, .24));
}

.premium-crate-body {
  text-align: center;
  min-height: 92px;
}

.premium-crate-body h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.2;
}

.premium-crate-body p {
  margin: 0;
  font-size: 14px;
}

.premium-crate-card .btn {
  width: 100%;
  margin-top: auto;
}

.inventory-grid {
  align-items: stretch;
}

.premium-skin-card {
  min-height: 410px;
  padding: 18px;
  display: flex;
  flex-direction: column;
}

.skin-rarity {
  align-self: flex-start;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.10);
  color: #cfe6ff;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 12px;
}

.premium-skin-image {
  height: 160px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}

.premium-skin-image img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  filter: drop-shadow(0 0 26px rgba(47, 140, 255, .24));
}

.premium-skin-body {
  margin-top: auto;
}

.premium-skin-body h3,
.premium-skin-body h4 {
  margin: 0;
  text-align: center;
  line-height: 1.25;
}

.premium-skin-body h3 {
  color: #f8fafc;
  font-size: 17px;
}

.premium-skin-body h4 {
  color: #7cc8ff;
  font-size: 15px;
  font-weight: 800;
  margin-top: 6px;
}

.skin-details {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.skin-details span {
  min-width: 0;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(2, 6, 23, .34);
  border: 1px solid rgba(255,255,255,.07);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #dcecff;
  font-size: 13px;
}

.skin-details strong {
  color: var(--muted);
}

.empty-state-card {
  max-width: 760px;
  min-height: 360px;
  margin: 0 auto;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 0%, rgba(34,211,238,.18), transparent 42%),
    #122238;
  border: 1px solid rgba(47,140,255,.24);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 34px;
}

.empty-icon {
  font-size: 72px;
  color: #7cc8ff;
}

@media (max-width: 1380px) {
  .premium-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .premium-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .opening-top,
  .sapphire-page-head {
    align-items: stretch;
    flex-direction: column;
  }

  .opening-result {
    min-width: 0;
  }
}

@media (max-width: 620px) {
  .premium-grid {
    grid-template-columns: 1fr;
  }
}

/* CS2 rarity backgrounds */
.rarity-card {
  isolation: isolate;
}

.rarity-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: .95;
}

.rarity-card::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 23px;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 4%, rgba(255,255,255,.13), transparent 34%),
    linear-gradient(180deg, rgba(15, 23, 42, .38), rgba(2, 6, 23, .82));
}

.rarity-consumer-grade::before,
.rarity-consumer::before {
  background: linear-gradient(160deg, #7b8794, #182230 64%);
}

.rarity-industrial-grade::before,
.rarity-industrial::before {
  background: linear-gradient(160deg, #5cc8ff, #14283f 64%);
}

.rarity-mil-spec-grade::before,
.rarity-mil-spec::before,
.rarity-milspec::before {
  background: linear-gradient(160deg, #2f73ff, #101f44 64%);
}

.rarity-restricted::before {
  background: linear-gradient(160deg, #7c3aed, #21123f 64%);
}

.rarity-classified::before {
  background: linear-gradient(160deg, #d946ef, #371437 64%);
}

.rarity-covert::before {
  background: linear-gradient(160deg, #ef4444, #3a1015 64%);
}

.rarity-extraordinary::before,
.rarity-rare-special::before {
  background: linear-gradient(160deg, #fbbf24, #3b2708 64%);
}

.rarity-contraband::before {
  background: linear-gradient(160deg, #f59e0b, #3b2208 64%);
}

.rarity-card .skin-rarity {
  background: rgba(2, 6, 23, .38);
  backdrop-filter: blur(10px);
}

.rarity-covert .skin-rarity {
  color: #fecaca;
  border-color: rgba(248, 113, 113, .35);
}

.rarity-classified .skin-rarity {
  color: #f5d0fe;
  border-color: rgba(217, 70, 239, .35);
}

.rarity-restricted .skin-rarity {
  color: #ddd6fe;
  border-color: rgba(124, 58, 237, .35);
}

.rarity-mil-spec-grade .skin-rarity,
.rarity-mil-spec .skin-rarity {
  color: #bfdbfe;
  border-color: rgba(47, 115, 255, .35);
}

.skin-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.equipped-tags {
  display: flex;
  gap: 6px;
}

.equip-tag {
  min-width: 34px;
  padding: 7px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 1000;
  text-align: center;
  border: 1px solid rgba(255,255,255,.14);
}

.equip-tag.t {
  color: #fde68a;
  background: rgba(245, 158, 11, .18);
}

.equip-tag.ct {
  color: #bae6fd;
  background: rgba(14, 165, 233, .18);
}

.equip-actions {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.equip-actions form {
  margin: 0;
}

.equip-btn {
  width: 100%;
  min-height: 42px;
  font-size: 13px;
}

.equip-btn.t {
  background: linear-gradient(135deg, #f59e0b, #b45309);
}

.equip-btn.ct {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
}

/* SAPPHIRE2 Inventory V2 */
.inventory-v2-page {
  min-height: 100vh;
}

.inventory-hero {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  gap: 20px;
  align-items: stretch;
  margin-bottom: 22px;
}

.inventory-hero h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 56px);
  letter-spacing: -0.05em;
}

.inventory-tip {
  border: 1px solid rgba(0, 210, 255, 0.28);
  background:
    radial-gradient(circle at top left, rgba(0, 210, 255, 0.18), transparent 38%),
    rgba(6, 12, 28, 0.72);
  box-shadow: 0 0 32px rgba(0, 210, 255, 0.08);
  border-radius: 22px;
  padding: 18px;
}

.tip-title {
  color: #67e8f9;
  font-weight: 900;
  margin-bottom: 8px;
}

.tip-text {
  color: rgba(235, 245, 255, 0.78);
  line-height: 1.5;
}

.panel-alert {
  border-radius: 16px;
  padding: 14px 16px;
  margin: 0 0 18px;
  border: 1px solid rgba(255,255,255,0.12);
}

.panel-alert.success {
  background: rgba(34, 197, 94, 0.12);
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.32);
}

.panel-alert.danger {
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.32);
}

.inventory-toolbar {
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(8, 13, 28, 0.72);
  backdrop-filter: blur(18px);
  border-radius: 22px;
  padding: 14px;
  margin-bottom: 22px;
}

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

.inventory-search,
.inventory-select {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(2, 6, 23, 0.72);
  color: #e5f6ff;
  border-radius: 14px;
  padding: 13px 14px;
  outline: none;
}

.inventory-search:focus,
.inventory-select:focus {
  border-color: rgba(0, 210, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(0, 210, 255, 0.08);
}

.primary-btn,
.ghost-btn {
  border: 0;
  border-radius: 14px;
  padding: 13px 18px;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.primary-btn {
  background: linear-gradient(135deg, #00d2ff, #7c3aed);
  color: white;
}

.ghost-btn {
  background: rgba(255,255,255,0.07);
  color: rgba(235,245,255,0.86);
}

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

.inventory-card-v2 {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 14px;
  min-height: 340px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.025)),
    rgba(8, 13, 28, 0.78);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 22px 60px rgba(0,0,0,0.28);
}

.inventory-card-v2::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: radial-gradient(circle at 50% 0%, rgba(0,210,255,0.16), transparent 42%);
  pointer-events: none;
}

.skin-status-row,
.skin-info,
.equip-actions-v2,
.skin-image-wrap {
  position: relative;
  z-index: 1;
}

.skin-status-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.rarity-pill {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 900;
  color: rgba(255,255,255,0.86);
  background: rgba(0,0,0,0.24);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 7px 10px;
}

.equipped-pills {
  display: flex;
  gap: 6px;
}

.equip-pill {
  border-radius: 999px;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 900;
}

.equip-pill.t {
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
}

.equip-pill.ct {
  background: rgba(0, 210, 255, 0.18);
  color: #a5f3fc;
}

.skin-image-wrap {
  height: 148px;
  display: grid;
  place-items: center;
  margin: 12px 0;
}

.skin-image-wrap img {
  max-width: 100%;
  max-height: 145px;
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(0,0,0,0.45));
  transition: transform .22s ease;
}

.inventory-card-v2:hover .skin-image-wrap img {
  transform: translateY(-4px) scale(1.04);
}

.skin-image-fallback {
  width: 110px;
  height: 110px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 950;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.06);
}

.skin-info h3 {
  margin: 0;
  color: white;
  font-size: 19px;
  letter-spacing: -0.03em;
}

.skin-info p {
  margin: 5px 0 10px;
  color: rgba(235,245,255,0.74);
  font-weight: 700;
}

.skin-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skin-meta span {
  font-size: 12px;
  color: rgba(235,245,255,0.68);
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  padding: 6px 8px;
}

.equip-actions-v2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.equip-actions-v2 form {
  margin: 0;
}

.equip-btn-v2 {
  width: 100%;
  border: 0;
  border-radius: 13px;
  padding: 11px 10px;
  color: white;
  font-weight: 900;
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease;
}

.equip-btn-v2:hover {
  transform: translateY(-1px);
  filter: brightness(1.12);
}

.equip-btn-v2.t {
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.equip-btn-v2.ct {
  background: linear-gradient(135deg, #06b6d4, #2563eb);
}

.equip-btn-v2.both {
  grid-column: span 2;
  background: linear-gradient(135deg, #7c3aed, #00d2ff);
}

.equip-btn-v2.active {
  box-shadow: 0 0 0 2px rgba(255,255,255,0.22) inset;
}

.pagination-v2 {
  margin: 24px 0 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

.pagination-v2 a,
.pagination-v2 span {
  border-radius: 999px;
  padding: 10px 14px;
  text-decoration: none;
  font-weight: 900;
}

.pagination-v2 a {
  color: white;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
}

.pagination-v2 .disabled {
  color: rgba(255,255,255,0.32);
  background: rgba(255,255,255,0.035);
}

.pagination-v2 .page-info {
  color: rgba(235,245,255,0.82);
}

.empty-state {
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(8, 13, 28, 0.72);
  border-radius: 24px;
  padding: 40px;
  text-align: center;
}

.rarity-consumer-grade { background: radial-gradient(circle at top, rgba(176,195,217,.26), transparent 42%), rgba(8,13,28,.82); }
.rarity-industrial-grade { background: radial-gradient(circle at top, rgba(94,152,217,.30), transparent 42%), rgba(8,13,28,.82); }
.rarity-mil-spec-grade,
.rarity-mil-spec,
.rarity-milspec { background: radial-gradient(circle at top, rgba(75,105,255,.32), transparent 42%), rgba(8,13,28,.82); }
.rarity-restricted { background: radial-gradient(circle at top, rgba(136,71,255,.34), transparent 42%), rgba(8,13,28,.82); }
.rarity-classified { background: radial-gradient(circle at top, rgba(211,44,230,.34), transparent 42%), rgba(8,13,28,.82); }
.rarity-covert { background: radial-gradient(circle at top, rgba(235,75,75,.38), transparent 42%), rgba(8,13,28,.82); }
.rarity-extraordinary,
.rarity-rare-special { background: radial-gradient(circle at top, rgba(255,215,0,.32), transparent 42%), rgba(8,13,28,.82); }
.rarity-contraband { background: radial-gradient(circle at top, rgba(228,174,57,.34), transparent 42%), rgba(8,13,28,.82); }

@media (max-width: 1200px) {
  .inventory-grid-v2 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .inventory-hero {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 560px) {
  .inventory-grid-v2 {
    grid-template-columns: 1fr;
  }
}


/* Inventory clean fixed layout */
.inventory-page-clean {
  width: 100%;
  max-width: 1420px;
  margin: 0 auto;
  padding: 18px 22px 60px;
}

.inventory-top-clean {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 18px;
  align-items: end;
  margin-bottom: 22px;
}

.inventory-top-clean h1 {
  margin: 4px 0 8px;
  font-size: clamp(38px, 4vw, 64px);
  letter-spacing: -0.06em;
  color: #eaf6ff;
}

.inventory-wp-notice {
  border: 1px solid rgba(0, 210, 255, .32);
  background: rgba(3, 8, 20, .72);
  border-radius: 20px;
  padding: 16px 18px;
  box-shadow: 0 0 34px rgba(0, 210, 255, .08);
}

.inventory-wp-notice strong {
  display: block;
  color: #67e8f9;
  margin-bottom: 6px;
}

.inventory-wp-notice span {
  color: rgba(235,245,255,.78);
  line-height: 1.45;
}

.inventory-controls-clean {
  margin-bottom: 22px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(3, 8, 20, .68);
  border-radius: 22px;
  padding: 14px;
}

.inventory-search-clean {
  display: grid;
  grid-template-columns: 1fr 220px 120px 100px;
  gap: 12px;
}

.inventory-search-clean input,
.inventory-search-clean select {
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(2, 6, 23, .82);
  color: #eaf6ff;
  border-radius: 14px;
  padding: 13px 14px;
  outline: none;
}

.inventory-search-clean button,
.inventory-search-clean a {
  border: 0;
  border-radius: 14px;
  padding: 13px 15px;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.inventory-search-clean button {
  background: linear-gradient(135deg, #00d2ff, #7c3aed);
  color: white;
  cursor: pointer;
}

.inventory-search-clean a {
  background: rgba(255,255,255,.07);
  color: rgba(235,245,255,.86);
}

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

.inv-skin-card {
  min-height: 330px;
  border-radius: 24px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.11);
  background: rgba(8,13,28,.82);
  box-shadow: 0 22px 55px rgba(0,0,0,.30);
  overflow: hidden;
  position: relative;
}

.inv-skin-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(0,210,255,.12), transparent 45%);
  pointer-events: none;
}

.inv-card-top,
.inv-img,
.inv-info,
.inv-actions {
  position: relative;
  z-index: 1;
}

.inv-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.inv-rarity {
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .08em;
  border-radius: 999px;
  padding: 7px 10px;
  color: white;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.13);
}

.inv-equipped-tags {
  display: flex;
  gap: 6px;
}

.tag-t,
.tag-ct {
  border-radius: 999px;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 950;
}

.tag-t {
  color: #fecaca;
  background: rgba(239,68,68,.2);
}

.tag-ct {
  color: #a5f3fc;
  background: rgba(6,182,212,.2);
}

.inv-img {
  height: 145px;
  display: grid;
  place-items: center;
  margin: 10px 0 12px;
}

.inv-img img {
  max-width: 100%;
  max-height: 140px;
  object-fit: contain;
  filter: drop-shadow(0 18px 25px rgba(0,0,0,.45));
}

.inv-info h3 {
  margin: 0;
  color: white;
  font-size: 18px;
  letter-spacing: -.03em;
}

.inv-info p {
  margin: 5px 0 10px;
  color: rgba(235,245,255,.74);
  font-weight: 750;
}

.inv-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inv-meta span {
  font-size: 12px;
  color: rgba(235,245,255,.68);
  background: rgba(255,255,255,.06);
  border-radius: 999px;
  padding: 6px 8px;
}

.inv-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.inv-actions form {
  margin: 0;
}

.inv-actions button {
  width: 100%;
  border: 0;
  border-radius: 13px;
  padding: 11px 9px;
  color: white;
  font-weight: 950;
  cursor: pointer;
}

.btn-t {
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.btn-ct {
  background: linear-gradient(135deg, #06b6d4, #2563eb);
}

.btn-both {
  background: linear-gradient(135deg, #7c3aed, #00d2ff);
}

.inv-actions button.active {
  box-shadow: 0 0 0 2px rgba(255,255,255,.25) inset;
}

.inventory-pagination-clean {
  margin-top: 26px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

.inventory-pagination-clean a,
.inventory-pagination-clean span,
.inventory-pagination-clean b {
  border-radius: 999px;
  padding: 10px 15px;
  color: rgba(235,245,255,.86);
  text-decoration: none;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
}

.inventory-pagination-clean span {
  opacity: .4;
}

@media (max-width: 1300px) {
  .inventory-grid-clean {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 950px) {
  .inventory-top-clean {
    grid-template-columns: 1fr;
  }

  .inventory-search-clean {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .inventory-page-clean {
    padding: 14px;
  }

  .inventory-grid-clean {
    grid-template-columns: 1fr;
  }
}


/* Inventory centered equip buttons fix */
.inv-actions {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.inv-actions form {
  flex: 0 1 46%;
  margin: 0;
}

.inv-actions form:only-child {
  flex-basis: 72%;
}

.inv-actions button {
  width: 100%;
}

.inv-actions .btn-both {
  max-width: 72%;
  margin: 0 auto;
}

.inv-actions form:has(.btn-both) {
  flex-basis: 100%;
  display: flex;
  justify-content: center;
}

.inv-actions form:has(.btn-both) button {
  width: 72%;
}

@media (max-width: 560px) {
  .inv-actions form,
  .inv-actions form:only-child {
    flex-basis: 100%;
  }

  .inv-actions form:has(.btn-both) button,
  .inv-actions .btn-both {
    width: 100%;
    max-width: 100%;
  }
}

