/* Auto Fortnite — общий стиль витрины и админки */
:root {
  --bg: #080b10;
  --panel: #121826;
  --panel-2: #0e1420;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e8ecf4;
  --muted: #8b97ab;
  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #f87171;
  --radius: 16px;
  --shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.9);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 520px at 8% -12%, rgba(124, 92, 255, 0.20), transparent 60%),
    radial-gradient(900px 480px at 100% -5%, rgba(34, 211, 238, 0.13), transparent 55%),
    var(--bg);
  color: var(--text);
  font: 15px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

/* ── типографика ─────────────────────────────────────────────── */
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.02em; }
h1 { font-size: clamp(30px, 4.2vw, 54px); font-weight: 700; }
h2 { font-size: clamp(22px, 2.6vw, 32px); font-weight: 650; }
h3 { font-size: 17px; font-weight: 600; }
p { margin: 0 0 12px; color: var(--muted); }

.gradient-text {
  background: linear-gradient(96deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ── контейнеры ──────────────────────────────────────────────── */
.wrap { width: min(1180px, 92vw); margin: 0 auto; }
.section { padding: 72px 0; }
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)) , var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

/* ── верхняя навигация ───────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(8, 11, 16, 0.72);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex; align-items: center; gap: 18px;
  height: 66px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center; font-size: 15px; color: #0a0d13; font-weight: 900;
}
.nav { display: flex; gap: 6px; margin-left: auto; align-items: center; }
.nav a, .nav button {
  padding: 8px 14px; border-radius: 10px; color: var(--muted);
  border: 1px solid transparent; background: none; cursor: pointer; font: inherit;
  transition: 0.16s ease;
}
.nav a:hover, .nav button:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav a.active { color: var(--text); border-color: var(--border-strong); background: rgba(255, 255, 255, 0.04); }

/* ── кнопки ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.04); color: var(--text);
  font: inherit; font-weight: 550; cursor: pointer; transition: 0.16s ease;
}
.btn:hover { background: rgba(255, 255, 255, 0.09); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #6a4bff);
  border-color: transparent; color: #fff;
  box-shadow: 0 12px 30px -14px rgba(124, 92, 255, 0.9);
}
.btn-primary:hover { background: linear-gradient(135deg, #8b6dff, #7355ff); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 9px; }
.btn-danger { border-color: rgba(248, 113, 113, 0.4); color: #fca5a5; }

/* ── поля ────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
input, select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  background: var(--panel-2); border: 1px solid var(--border);
  color: var(--text); font: inherit; outline: none; transition: 0.16s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(124, 92, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.16);
}
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }

/* ── витрина ─────────────────────────────────────────────────── */
.hero { padding: 96px 0 56px; text-align: center; }
.hero p { max-width: 620px; margin: 0 auto 26px; font-size: 17px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px; font-size: 13px;
  border: 1px solid var(--border-strong); background: rgba(255, 255, 255, 0.03); color: var(--muted);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }

.catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 16px; }
.sku {
  position: relative; overflow: hidden;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; transition: 0.18s ease;
}
.sku:hover { border-color: rgba(124, 92, 255, 0.45); transform: translateY(-3px); }
.sku::after {
  content: ""; position: absolute; inset: -1px -1px auto -1px; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); opacity: 0.85;
}
.sku-amount { font-size: 30px; font-weight: 750; letter-spacing: -0.03em; }
.sku-amount span { font-size: 15px; color: var(--muted); font-weight: 500; }
.sku-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.sku-price { font-size: 19px; font-weight: 650; color: var(--accent-2); }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.step-num {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(124, 92, 255, 0.16); color: #b7a6ff; font-weight: 700; margin-bottom: 12px;
}

.footer { border-top: 1px solid var(--border); padding: 28px 0; color: var(--muted); font-size: 13px; }

/* ── логин ───────────────────────────────────────────────────── */
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(400px, 100%); }
.auth-card .brand { justify-content: center; margin-bottom: 22px; }
.error-box {
  display: none; margin-bottom: 14px; padding: 10px 12px; border-radius: 10px;
  background: rgba(248, 113, 113, 0.12); border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fca5a5; font-size: 13px;
}
.error-box.show { display: block; }

/* ── админка ─────────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  border-right: 1px solid var(--border); background: rgba(10, 14, 21, 0.7);
  padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .brand { padding: 4px 8px 18px; }
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-nav button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; border-radius: 10px; border: 1px solid transparent;
  background: none; color: var(--muted); font: inherit; cursor: pointer; text-align: left;
  transition: 0.14s ease;
}
.side-nav button:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.side-nav button.active {
  color: var(--text); background: rgba(124, 92, 255, 0.16);
  border-color: rgba(124, 92, 255, 0.4);
}
.side-nav .ico { width: 18px; text-align: center; opacity: 0.9; }

.main { padding: 26px 30px 60px; min-width: 0; }
.main-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.main-head h2 { margin: 0; }
.main-head .spacer { margin-left: auto; }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px;
  border-radius: 999px; border: 1px solid var(--border); font-size: 13px; color: var(--muted);
}

.tab { display: none; }
.tab.active { display: block; animation: fade 0.22s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.actions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.action-card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
.action-card h3 { margin-bottom: 4px; }
.action-card .hint { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; min-height: 18px; }
.method {
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px;
  letter-spacing: 0.06em; margin-right: 8px; vertical-align: middle;
}
.method.GET { background: rgba(52, 211, 153, 0.16); color: #6ee7b7; }
.method.POST { background: rgba(124, 92, 255, 0.2); color: #c4b5fd; }

.result {
  margin: 12px 0 0; padding: 12px; border-radius: 10px; background: #070a0f;
  border: 1px solid var(--border); font-size: 12.5px; line-height: 1.5;
  max-height: 260px; overflow: auto; white-space: pre-wrap; word-break: break-word;
  color: #9fb0c9; display: none;
}
.result.show { display: block; }
.result.ok { border-color: rgba(52, 211, 153, 0.4); }
.result.err { border-color: rgba(248, 113, 113, 0.45); color: #fca5a5; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 15px 16px; }
.stat b { display: block; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.stat span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; }

.kbd {
  font-family: ui-monospace, monospace; font-size: 12px; padding: 2px 6px;
  border-radius: 6px; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--border);
}
pre.code {
  background: #070a0f; border: 1px solid var(--border); border-radius: 12px;
  padding: 14px; overflow: auto; font-size: 12.5px; color: #9fb0c9; margin: 10px 0 0;
}

/* ── тосты ───────────────────────────────────────────────────── */
.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; z-index: 50; }
.toast {
  padding: 12px 16px; border-radius: 12px; font-size: 13.5px; max-width: 340px;
  background: #111827; border: 1px solid var(--border-strong); box-shadow: var(--shadow);
  animation: slide 0.2s ease;
}
.toast.err { border-color: rgba(248, 113, 113, 0.5); }
.toast.ok { border-color: rgba(52, 211, 153, 0.5); }
@keyframes slide { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

/* ── адаптив ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .side-nav { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .side-nav button { white-space: nowrap; }
  .main { padding: 20px 16px 48px; }
  .steps { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 36px; }
}
