:root {
  --bg: #070b0d;
  --panel: #111b21;
  --panel-2: #15242b;
  --line: rgba(255, 255, 255, 0.12);
  --text: #eef7f4;
  --muted: #9aaba8;
  --gold: #ffb000;
  --orange: #ff7a18;
  --lime: #bfff26;
  --cyan: #20e7ff;
  --green: #28d46d;
  --red: #ff4754;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Bahnschrift", "Aptos", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(32, 231, 255, 0.14), transparent 28rem),
    radial-gradient(circle at 82% 2%, rgba(255, 176, 0, 0.14), transparent 25rem),
    linear-gradient(140deg, var(--bg) 0%, #0f171b 54%, var(--bg) 100%);
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.shell {
  width: min(1210px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(4, 6, 7, 0.88);
  backdrop-filter: blur(18px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 78px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #071010;
  background: linear-gradient(135deg, var(--gold), var(--lime));
  box-shadow: 0 0 34px rgba(255, 176, 0, 0.24);
  font-weight: 950;
}

.brand-title {
  display: block;
  color: #f7ff00;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 950;
  letter-spacing: 0.15em;
  line-height: 1;
}

.brand-subtitle {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 92px;
  height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle::before {
  content: "Menu";
  margin-right: 8px;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.nav a,
.nav button,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-weight: 850;
  text-decoration: none;
  text-transform: uppercase;
}

.nav a:hover,
.nav a.active,
.ghost-btn:hover {
  border-color: rgba(32, 231, 255, 0.36);
  color: var(--cyan);
  background: rgba(32, 231, 255, 0.08);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: 24px;
  padding: 42px 0 26px;
}

.hero-card,
.panel,
.notice,
.stat-card,
.product-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 27, 33, 0.84);
  box-shadow: var(--shadow);
}

.hero-card {
  position: relative;
  overflow: hidden;
  min-height: 330px;
  padding: clamp(24px, 4vw, 46px);
  border-radius: calc(var(--radius) + 10px);
  background:
    linear-gradient(105deg, rgba(255, 176, 0, 0.2), transparent 42%),
    linear-gradient(145deg, rgba(17, 27, 33, 0.96), rgba(7, 11, 13, 0.94));
}

.hero-card::after {
  content: "";
  position: absolute;
  right: -150px;
  bottom: -190px;
  width: 470px;
  height: 470px;
  border-radius: 50%;
  background: conic-gradient(from 210deg, var(--cyan), var(--lime), var(--gold), var(--cyan));
  opacity: 0.15;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(191, 255, 38, 0.34);
  border-radius: 999px;
  color: var(--lime);
  background: rgba(191, 255, 38, 0.08);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

h1 {
  margin: 20px 0 14px;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.92;
  letter-spacing: -0.055em;
}

.hero-copy {
  max-width: 700px;
  color: #d8e2df;
  font-size: 19px;
  line-height: 1.62;
}

.hero-actions,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.side-stack {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.notice {
  padding: 20px;
  min-width: 0;
}

.public-notice {
  margin: 18px 0 10px;
}

.notice h2,
.notice h3 {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 22px;
}

.notice p {
  margin: 0;
  color: #dce5e2;
  line-height: 1.55;
}

.qr-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(32, 231, 255, 0.24);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.qr-media {
  width: min(100%, 300px);
  max-width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0 auto 8px;
  padding: 8px;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.qr-img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  margin: 0;
  border-radius: 14px;
  background: #fff;
  object-fit: contain;
  padding: 8px;
}

.qr-card .field {
  margin: 0;
}

.qr-card .input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 11px;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qr-card .field label {
  margin-bottom: 5px;
  font-size: 11px;
}

.qr-card .muted {
  font-size: 12px;
  line-height: 1.45;
}

.stats,
.grid.two,
.grid.three,
.grid.products {
  display: grid;
  gap: 18px;
}

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

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

.grid.products {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-bottom: 54px;
}

.stat-card {
  padding: 18px;
}

.stat-card strong {
  display: block;
  color: var(--lime);
  font-size: 28px;
  line-height: 1;
}

.stat-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.admin-stat-card small {
  display: block;
  margin-top: 10px;
  color: #c6d2cf;
  font-size: 13px;
  line-height: 1.5;
}

.admin-copy {
  max-width: 860px;
  margin: 12px 0 0;
  font-size: 16px;
}

.dashboard-list {
  display: grid;
  gap: 14px;
}

.dashboard-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.03);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 24px rgba(0, 0, 0, 0.18);
}

.dashboard-item-main {
  min-width: 0;
  flex: 1 1 auto;
}

.dashboard-item-title {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 16px;
  font-weight: 950;
  line-height: 1.35;
  word-break: break-word;
}

.dashboard-item-meta {
  display: block;
  color: #b8c6c3;
  line-height: 1.55;
  word-break: break-word;
}

.dashboard-item-side {
  display: flex;
  min-width: 132px;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  text-align: right;
}

.dashboard-item-value {
  font-size: 20px;
  line-height: 1;
}

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

.shortcut-card {
  display: block;
  min-height: 100%;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.03);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 22px rgba(0, 0, 0, 0.14);
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.shortcut-card:hover {
  transform: translateY(-2px);
  border-color: rgba(32, 231, 255, 0.28);
  background: rgba(32, 231, 255, 0.06);
}

.shortcut-title {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 950;
  color: var(--text);
}

.shortcut-copy {
  display: block;
  color: #d1dcda;
  line-height: 1.5;
}

.recent-activity-grid {
  padding-bottom: 54px;
}

.activity-panel {
  overflow: hidden;
}

.activity-list {
  display: grid;
  gap: 12px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.03);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 24px rgba(0, 0, 0, 0.16);
}

.activity-main {
  color: #dce5e2;
  line-height: 1.5;
}

.activity-user {
  color: #7dff8f;
  font-weight: 950;
}

.activity-product {
  color: #f3f8f6;
  font-weight: 850;
}

.activity-method {
  color: #ff7a18;
  font-weight: 950;
}

.activity-price {
  color: #469fff;
  font-weight: 950;
}

.activity-time {
  flex: 0 0 auto;
  padding: 8px 11px;
  border-radius: 12px;
  color: #eef7f4;
  background: linear-gradient(135deg, #337bff, #1e57c9);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 26px 0 18px;
}

.section-title {
  margin: 0;
  padding-left: 16px;
  border-left: 6px solid var(--gold);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  outline: 0;
  background: rgba(5, 7, 8, 0.62);
  color: var(--text);
  padding: 10px 12px;
}

.color-input {
  height: 50px;
  padding: 6px;
}

textarea {
  min-height: 104px;
  resize: vertical;
}

.input:focus,
select:focus,
textarea:focus {
  border-color: rgba(32, 231, 255, 0.65);
  box-shadow: 0 0 0 4px rgba(32, 231, 255, 0.08);
}

.field label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.image-upload-field {
  min-width: 0;
}

.image-upload-preview,
.image-upload-empty {
  width: min(100%, 240px);
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.image-upload-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.image-upload-empty {
  display: grid;
  place-items: center;
  min-height: 120px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.image-upload-path,
.upload-hint {
  margin-top: 8px;
  line-height: 1.5;
  word-break: break-word;
}

.primary-btn,
.success-btn,
.danger-btn,
.mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 14px;
  color: #071010;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  box-shadow: 0 12px 34px rgba(255, 122, 24, 0.18);
  font-weight: 950;
  text-decoration: none;
  text-transform: uppercase;
}

.success-btn {
  background: linear-gradient(135deg, var(--green), var(--lime));
}

.danger-btn {
  color: white;
  background: linear-gradient(135deg, var(--red), #981424);
}

.mini-btn {
  min-height: 34px;
  padding: 8px 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  font-size: 13px;
}

.product-card {
  overflow: hidden;
  background: linear-gradient(180deg, rgba(21, 35, 42, 0.96), rgba(9, 13, 15, 0.98));
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 176, 0, 0.42);
}

.game-card {
  min-height: 100%;
}

.game-cover {
  height: 210px;
}

.wide-btn {
  width: 100%;
}

.cover {
  position: relative;
  height: 190px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 176, 0, 0.2), transparent 42%),
    radial-gradient(circle at 80% 18%, rgba(32, 231, 255, 0.2), transparent 28%),
    linear-gradient(145deg, #1f3039, #0a0e11);
}

.cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-art {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 58px;
  font-weight: 950;
  letter-spacing: -0.08em;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.44);
}

.ribbon,
.fresh,
.status {
  display: inline-flex;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.ribbon,
.fresh {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 8px 10px;
}

.ribbon {
  left: 12px;
  color: #251500;
  background: var(--gold);
}

.fresh {
  right: 12px;
  color: #031409;
  background: var(--green);
}

.product-body {
  padding: 18px;
}

.product-body h3 {
  margin: 0 0 8px;
  min-height: 58px;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.product-body p {
  min-height: 44px;
  margin: 0 0 16px;
  color: #c8d5d2;
  line-height: 1.45;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
}

.chip {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.panel {
  padding: 22px;
  margin: 24px 0;
}

.admin-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 24px 0 56px;
}

.admin-menu {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 27, 33, 0.88);
}

.admin-menu a,
.admin-menu button {
  padding: 12px 14px;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  font-weight: 950;
  text-align: left;
  text-decoration: none;
}

.admin-menu a.active {
  color: #071010;
  background: linear-gradient(135deg, var(--gold), var(--lime));
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
}

table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

tr:last-child td {
  border-bottom: 0;
}

th {
  color: var(--lime);
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status {
  padding: 6px 9px;
}

.status.active,
.status.available,
.status.approved,
.status.delivered,
.status.matched {
  color: #031409;
  background: var(--green);
}

.status.pending,
.status.unmatched,
.status.ignored {
  color: #251500;
  background: var(--gold);
}

.status.rejected,
.status.cancelled,
.status.hidden,
.status.locked,
.status.error {
  color: white;
  background: var(--red);
}

.status.sold {
  color: white;
  background: #47545c;
}

.money {
  color: var(--gold);
  font-weight: 950;
}

.key-value-cell,
.key-editor {
  font-family: Consolas, Monaco, "Courier New", monospace;
  word-break: break-all;
}

.key-value-cell {
  max-width: 340px;
  white-space: pre-wrap;
  line-height: 1.55;
}

.key-editor {
  min-height: 98px;
}

.admin-filter-grid {
  align-items: end;
}

.admin-list-meta {
  margin: 14px 0;
}

.admin-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.pager-link.active {
  color: #071010;
  background: linear-gradient(135deg, var(--gold), var(--orange));
}

.pager-info {
  margin-left: auto;
}

.muted {
  color: var(--muted);
}

.empty,
.alert {
  padding: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.alert.error {
  border-color: rgba(255, 71, 84, 0.45);
  color: #ffd6da;
}

.alert.ok {
  border-color: rgba(40, 212, 109, 0.45);
  color: #d7ffe5;
}

.footer {
  padding: 34px 0 46px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@media (max-width: 980px) {
  .hero,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .key-value-cell {
    max-width: 220px;
  }

  .pager-info {
    width: 100%;
    margin-left: 0;
  }

  .admin-menu {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .dashboard-shortcuts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .topbar-inner {
    align-items: center;
    flex-wrap: wrap;
    padding: 14px 0;
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .brand-title {
    font-size: clamp(20px, 5vw, 30px);
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
    padding-top: 10px;
  }

  .nav.nav-collapsible {
    display: none;
    flex-direction: column;
    align-items: stretch;
  }

  .nav.nav-collapsible.is-open {
    display: flex;
  }

  .nav a,
  .nav button {
    width: 100%;
    justify-content: flex-start;
    border-radius: 16px;
  }
}

@media (max-width: 680px) {
  .shell {
    width: min(100% - 22px, 1210px);
  }

  .grid.products,
  .grid.two,
  .grid.three,
  .stats {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  h1 {
    font-size: clamp(32px, 12vw, 52px);
    line-height: 0.98;
  }

  .hero-copy {
    font-size: 17px;
    line-height: 1.55;
  }

  .notice,
  .side-stack,
  .qr-card {
    min-width: 0;
    max-width: 100%;
  }

  .qr-media {
    width: min(100%, 248px);
    padding: 6px;
  }

  .qr-img {
    padding: 6px;
  }

  .dashboard-item,
  .dashboard-item-side,
  .activity-item {
    align-items: flex-start;
    flex-direction: column;
    text-align: left;
  }

  .activity-time {
    align-self: flex-start;
  }
}
