:root {
  --bg: #070c16;
  --card: #10192b;
  --line: rgba(168, 196, 255, 0.16);
  --text: #eef3ff;
  --muted: #93a4c4;
  --blue: #3c7dff;
  --good: #3ddebe;
  --bad: #ff8ea0;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
  color-scheme: dark;
  font-family: Manrope, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.45;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: #2456c9; color: white; }
:focus-visible { outline: 2px solid #9ec0ff; outline-offset: 2px; }
[hidden] { display: none !important; }

body.is-gate {
  background-color: #04122e;
  background-image: url("login-bg.png");
  background-position: center 42%;
  background-size: cover;
  background-repeat: no-repeat;
}
@media (min-width: 900px) {
  body.is-gate {
    background-image: url("login-bg-desktop.png");
    background-position: center;
  }
}

.gate {
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 28px 16px calc(32px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(4, 18, 52, 0.05) 0%, rgba(4, 14, 40, 0.12) 38%, rgba(3, 8, 20, 0.82) 100%);
}

.panel {
  width: min(440px, 100%);
  padding: 26px 22px 20px;
  border-radius: 28px;
  background: rgba(6, 12, 28, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.72);
}
.panel h1 {
  margin: 8px 0 0;
  font-size: clamp(40px, 7vw, 56px);
  line-height: 0.92;
  letter-spacing: -0.05em;
}
.lead {
  margin: 12px 0 0;
  color: rgba(238, 243, 255, 0.86);
  font-size: 16px;
}
.fine {
  margin: 8px 0 0;
  color: rgba(238, 243, 255, 0.68);
  font-size: 14px;
}
.panel a.fine { display: block; color: white; }
.wait {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 0;
  color: white;
  font-weight: 600;
}
.wait-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8eb4ff;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) {
  .wait-dot { animation: none; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 18px;
  border: 0;
  border-radius: 16px;
  background: var(--blue);
  color: white;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(20, 60, 160, 0.28);
}
.btn.light { background: white; color: #07122e; box-shadow: none; }
.btn.block { width: 100%; margin-top: 18px; }
.btn.small { height: 40px; border-radius: 12px; padding: 0 14px; box-shadow: none; }
.btn:disabled { opacity: 0.65; cursor: wait; }
.btn.ghost, .ghost {
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-weight: 600;
  box-shadow: none;
}
.btn.danger {
  background: transparent;
  color: var(--bad);
  border: 1px solid rgba(255, 142, 160, 0.35);
  box-shadow: none;
}

.shell { min-height: 100dvh; }
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(7, 12, 22, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: none;
  padding: 0;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 16px;
}
.brand-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #123a86;
  color: white;
  font-size: 12px;
  letter-spacing: 0;
}
.top-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}
.who { color: var(--muted); font-size: 14px; }
.bal { font-weight: 800; font-variant-numeric: tabular-nums; }

.wrap {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}
.page-head h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 44px);
  letter-spacing: -0.045em;
  line-height: 1;
}
.page-head p { margin: 10px 0 0; max-width: 560px; color: var(--muted); }

.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 22px 0 16px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip, .tabs button {
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-weight: 600;
}
.chip.on, .tabs button.on {
  background: white;
  color: #07122e;
  border-color: white;
}
.search, .select, .field input, .field select, .field textarea {
  border: 1px solid var(--line);
  background: #0c1526;
  border-radius: 12px;
}
.search { height: 36px; padding: 0 12px; min-width: min(240px, 100%); }
.select { height: 36px; padding: 0 10px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}
.card {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 42%),
    var(--card);
}
.card-hit {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 0;
  border-radius: inherit;
  background: transparent;
  cursor: pointer;
}
.idline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.icon-btn {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(7, 16, 38, 0.72);
  color: var(--text);
  cursor: pointer;
}
.icon-btn .ico { width: 14px; height: 14px; }
.card-age {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
}
.ghost.iconly {
  width: 36px;
  padding: 0;
}
.card:hover { border-color: rgba(142, 180, 255, 0.5); }
.card-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.card-phone { font-weight: 700; font-size: 17px; }
.card-user { margin-top: 4px; color: var(--muted); }
.price {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.tag.clean { color: var(--good); }
.tag.limited { color: var(--bad); }
.desc {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.empty {
  padding: 28px 8px;
  color: var(--muted);
}

.back {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-weight: 600;
}
.sheet { width: min(720px, 100%); }
.facts { margin-top: 8px; }
.fact {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.fact span { color: var(--muted); }
.fact b { text-align: right; font-weight: 700; }
.fact b.with-copy { display: inline-flex; align-items: center; gap: 8px; }
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.stat {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--card);
}
.stat span { display: block; color: var(--muted); font-size: 13px; }
.stat b { display: block; margin-top: 6px; font-size: 16px; word-break: break-word; }
.section-title { margin: 28px 0 0; font-size: 22px; letter-spacing: -0.03em; }
.hist { display: grid; gap: 8px; margin-top: 12px; }
.hist article, .hist button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
  color: inherit;
  text-align: left;
  font: inherit;
}
.hist span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.story { margin: 16px 0 0; white-space: pre-wrap; }

.buybar {
  position: sticky;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding: 12px;
  border-radius: 20px;
  background: rgba(16, 25, 43, 0.94);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.buybar p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.buy-actions { display: flex; gap: 8px; }

.delivery {
  margin-top: 18px;
  padding: 18px 18px 8px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(61, 222, 190, 0.1), transparent 46%),
    var(--card);
  border: 1px solid rgba(61, 222, 190, 0.3);
}
.delivery h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -0.03em; }
.secret {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.secret span { display: block; color: var(--muted); font-size: 13px; }
.secret code {
  font-family: Consolas, ui-monospace, monospace;
  font-size: 15px;
  word-break: break-all;
}
.delivery .btn { margin: 16px 0; }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.form, .stack { display: grid; gap: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 650; }
.field input, .field select, .field textarea { color: var(--text); padding: 0 12px; height: 46px; }
.field textarea { height: 96px; padding: 12px; resize: vertical; }
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 600;
}
.help { margin: 0; color: var(--muted); font-size: 13px; }
.stock {
  display: grid;
  gap: 10px;
}
.stock article {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--card);
}
.stock-top, .row-actions { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.row-actions { justify-content: flex-start; margin-top: 10px; }
.mono { font-family: Consolas, ui-monospace, monospace; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 30;
  width: min(420px, calc(100% - 24px));
  padding: 12px 14px;
  border-radius: 14px;
  background: #17233a;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.btn { gap: 8px; }
.ghost { display: inline-flex; align-items: center; gap: 6px; }
button.bal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  padding: 0;
}
.back { display: inline-flex; align-items: center; gap: 6px; }
.page-head h1, .support-block h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ico { width: 1.15em; height: 1.15em; flex: none; }
.menu .ico, .methods .ico { width: 22px; height: 22px; }

.panel .field { margin-top: 16px; }
.methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}
.methods button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: white;
  font-weight: 700;
}
.methods button.on { background: white; color: #07122e; }
.pay-methods { margin-top: 0; }
.pay-methods .btn { width: 100%; }
.text-btn {
  display: block;
  width: 100%;
  margin-top: 8px;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
}
.support-block { margin-top: 22px; }
.support-block h2 {
  margin: 0 0 10px;
  font-size: 18px;
}
.support-block .fine { margin-bottom: 8px; }
.support {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.support a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: inherit;
  text-decoration: none;
  background: rgba(8, 16, 36, 0.35);
  font-weight: 600;
}
.menu {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.menu button {
  display: grid;
  justify-items: start;
  gap: 8px;
  text-align: left;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 46%),
    var(--card);
}
.menu button span { font-size: 22px; font-weight: 700; letter-spacing: -0.03em; }
.menu button small { color: var(--muted); font-size: 14px; }
.menu .ico { color: #9ec0ff; }
.invoice {
  margin-top: 18px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--card);
}
.invoice h2 { margin: 0 0 8px; }
.invoice .btn { margin-top: 8px; }
.invoice code { word-break: break-all; }
@media (min-width: 900px) {
  .gate { align-items: center; padding-top: 32px; }
}
@media (max-width: 720px) {
  .who { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .buybar { align-items: stretch; flex-direction: column; }
  .buy-actions { width: 100%; }
  .buy-actions .btn { flex: 1; }
  .menu { grid-template-columns: 1fr; }
}

