:root {
  --bg: #07070f;
  --bg-soft: #0d0d1c;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.075);
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.2);
  --text: #f4f4ff;
  --muted: #a2a2c4;
  --dim: #71719a;
  --brand: #7c5cff;
  --brand-2: #00d4ff;
  --brand-3: #ff4ecd;
  --ok: #2fd47f;
  --warn: #ffb020;
  --danger: #ff5470;
  --grad: linear-gradient(120deg, #7c5cff 0%, #00d4ff 55%, #ff4ecd 100%);
  --grad-soft: linear-gradient(120deg, rgba(124, 92, 255, 0.22), rgba(0, 212, 255, 0.18));
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.6);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 66px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -30%;
  z-index: -2;
  background:
    radial-gradient(38% 38% at 18% 12%, rgba(124, 92, 255, 0.4), transparent 60%),
    radial-gradient(34% 34% at 82% 18%, rgba(0, 212, 255, 0.28), transparent 62%),
    radial-gradient(40% 40% at 62% 88%, rgba(255, 78, 205, 0.26), transparent 60%);
  filter: blur(20px);
  animation: drift 26s var(--ease) infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(70% 60% at 50% 20%, #000 20%, transparent 80%);
}

@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-2%, 2%, 0) scale(1.06); }
  100% { transform: translate3d(2%, -2%, 0) scale(1.02); }
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes pop {
  0% { transform: scale(0.92); opacity: 0; }
  60% { transform: scale(1.02); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes shimmer {
  0% { background-position: -220px 0; }
  100% { background-position: 220px 0; }
}

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(124, 92, 255, 0.5); }
  70% { box-shadow: 0 0 0 22px rgba(124, 92, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(124, 92, 255, 0); }
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 20px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.24); }

.container { width: min(1240px, calc(100% - 40px)); margin-inline: auto; }
.mono { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.hidden { display: none !important; }
.center { text-align: center; }

/* ---------- NAV ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(7, 7, 15, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 18px; width: 100%; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: -0.02em; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--grad);
  box-shadow: 0 8px 22px rgba(124, 92, 255, 0.45);
  font-size: 19px;
}
.brand-name { font-size: 17px; }
.brand-name span { display: block; font-size: 11px; font-weight: 600; color: var(--dim); letter-spacing: 0.06em; }
.nav-links { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav-link {
  padding: 9px 14px; border-radius: 12px; font-size: 14px; font-weight: 600;
  color: var(--muted); transition: 0.22s var(--ease); border: 1px solid transparent;
  display: inline-flex; align-items: center; gap: 8px;
}
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active { color: var(--text); background: var(--surface-2); border-color: var(--border); }
.nav-link.admin-link { color: #ffd27a; border-color: rgba(255, 210, 122, 0.28); background: rgba(255, 210, 122, 0.08); }
.nav-toggle { display: none; }

/* ---------- BUTTONS ---------- */
.btn {
  --btn-bg: var(--surface-2);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--btn-bg);
  color: var(--text);
  font-weight: 700; font-size: 14.5px;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.25s var(--ease), border-color 0.2s, opacity 0.2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.btn:active { transform: translateY(0) scale(0.985); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-primary {
  border: none;
  background: var(--grad);
  color: #08080f;
  box-shadow: 0 12px 30px rgba(124, 92, 255, 0.35);
}
.btn-primary:hover { box-shadow: 0 18px 44px rgba(124, 92, 255, 0.5); }
.btn-ghost { background: transparent; }
.btn-soft { background: var(--grad-soft); border-color: rgba(124, 92, 255, 0.35); }
.btn-danger { background: rgba(255, 84, 112, 0.16); border-color: rgba(255, 84, 112, 0.4); color: #ffc2cd; }
.btn-ok { background: rgba(47, 212, 127, 0.16); border-color: rgba(47, 212, 127, 0.4); color: #b6f5d5; }
.btn-warn { background: rgba(255, 176, 32, 0.16); border-color: rgba(255, 176, 32, 0.4); color: #ffe0a8; }
.btn-sm { padding: 8px 13px; font-size: 13px; border-radius: 11px; }
.btn-lg { padding: 17px 34px; font-size: 17px; border-radius: 18px; }
.btn-block { width: 100%; }
.btn-hero {
  padding: 20px 46px; font-size: 19px; font-weight: 800; border-radius: 20px; letter-spacing: 0.02em;
}
.btn-hero::after {
  content: "";
  position: absolute; inset: -3px; border-radius: inherit; z-index: -1;
  background: var(--grad); filter: blur(18px); opacity: 0.55;
}
.btn-hero { animation: pulse-ring 3s infinite 1s; }
.btn .spin {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: currentColor;
  animation: spin 0.7s linear infinite;
}

/* ---------- HERO ---------- */
.hero { padding: 74px 0 40px; text-align: center; position: relative; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--muted);
  backdrop-filter: blur(10px);
}
.hero-badge b { color: var(--text); }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(47, 212, 127, 0.16); }
.hero h1 {
  font-size: clamp(38px, 6.4vw, 74px);
  line-height: 1.03;
  letter-spacing: -0.035em;
  font-weight: 850;
  margin: 22px 0 18px;
}
.hero h1 .line2 { display: block; }
.hero p.lead { max-width: 640px; margin: 0 auto; font-size: 17.5px; color: var(--muted); }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.hero-stats { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 40px; }
.hero-stat {
  min-width: 132px; padding: 16px 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); backdrop-filter: blur(12px);
}
.hero-stat b { display: block; font-size: 26px; letter-spacing: -0.02em; }
.hero-stat span { font-size: 12.5px; color: var(--dim); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }

.section { padding: 54px 0; }
.section-head { text-align: center; margin-bottom: 34px; }
.section-head h2 { font-size: clamp(26px, 3.6vw, 40px); letter-spacing: -0.03em; font-weight: 800; }
.section-head p { color: var(--muted); margin-top: 10px; }

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }

.card {
  position: relative;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  transition: transform 0.28s var(--ease), border-color 0.28s, background 0.28s;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(120% 90% at 10% 0%, rgba(124, 92, 255, 0.18), transparent 60%);
  pointer-events: none;
}
.card:hover { transform: translateY(-5px); border-color: var(--border-strong); }
.card:hover::before { opacity: 1; }
.card-icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: var(--grad-soft); border: 1px solid rgba(124, 92, 255, 0.3); font-size: 22px; margin-bottom: 14px;
}
.card h3 { font-size: 17.5px; margin-bottom: 6px; letter-spacing: -0.015em; }
.card p { color: var(--muted); font-size: 14px; }
.card .card-num {
  position: absolute; top: 16px; right: 20px; font-size: 42px; font-weight: 800;
  color: rgba(255, 255, 255, 0.05);
}

/* ---------- SECTION PICK ---------- */
.pick-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.pick {
  position: relative; padding: 30px; border-radius: var(--radius-lg); text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.pick:hover { transform: translateY(-6px); border-color: var(--border-strong); }
.pick.selected { border-color: rgba(124, 92, 255, 0.7); box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.5), 0 22px 50px rgba(124, 92, 255, 0.28); }
.pick-emoji { font-size: 44px; }
.pick h3 { font-size: 22px; margin: 12px 0 8px; letter-spacing: -0.02em; }
.pick p { color: var(--muted); font-size: 14.5px; }
.pick-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.tag {
  padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
}
.pick-glow { position: absolute; width: 220px; height: 220px; border-radius: 50%; filter: blur(60px); opacity: 0.5; top: -80px; right: -60px; }
.pick.a .pick-glow { background: #7c5cff; }
.pick.b .pick-glow { background: #00d4ff; }
/* ---------- WIZARD ---------- */
.page { padding: 30px 0 70px; }
.page-head { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: clamp(24px, 3.2vw, 34px); letter-spacing: -0.03em; font-weight: 800; }
.page-head p { color: var(--muted); font-size: 14.5px; }

.steps { display: flex; align-items: center; gap: 6px; margin: 22px 0 26px; overflow-x: auto; padding-bottom: 4px; }
.step { display: flex; align-items: center; gap: 10px; flex: 1 1 0; min-width: 132px; }
.step-dot {
  width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center;
  font-weight: 800; font-size: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--dim);
  transition: 0.3s var(--ease);
}
.step-label { font-size: 13px; font-weight: 700; color: var(--dim); white-space: nowrap; }
.step-line { flex: 1; height: 2px; min-width: 18px; border-radius: 2px; background: var(--border); }
.step.done .step-dot { background: rgba(47, 212, 127, 0.16); border-color: rgba(47, 212, 127, 0.45); color: #b6f5d5; }
.step.done .step-label { color: var(--muted); }
.step.done .step-line { background: rgba(47, 212, 127, 0.45); }
.step.active .step-dot { background: var(--grad); border-color: transparent; color: #08080f; box-shadow: 0 10px 26px rgba(124, 92, 255, 0.45); }
.step.active .step-label { color: var(--text); }

.wizard { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 22px; align-items: start; }
.panel {
  border-radius: var(--radius-lg); border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(16px); box-shadow: var(--shadow); overflow: hidden;
}
.panel-head { padding: 22px 26px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 14px; }
.panel-head h2 { font-size: 19px; letter-spacing: -0.02em; }
.panel-head p { font-size: 13.5px; color: var(--muted); }
.panel-body { padding: 24px 26px; }
.panel-foot { padding: 18px 26px; border-top: 1px solid var(--border); display: flex; gap: 12px; justify-content: space-between; background: rgba(0, 0, 0, 0.18); }
.stage { position: sticky; top: calc(var(--nav-h) + 18px); }
.stage-body { padding: 20px; }
.preview-box {
  position: relative; aspect-ratio: 1; border-radius: var(--radius);
  background: radial-gradient(circle at 50% 42%, rgba(124, 92, 255, 0.16), rgba(255, 255, 255, 0.03) 70%);
  border: 1px solid var(--border); display: grid; place-items: center; overflow: hidden;
}
.preview-box .lottie-host { width: 100%; height: 100%; display: grid; place-items: center; }
.preview-box .lottie-host > div { width: 100%; height: 100%; }
.preview-empty { text-align: center; color: var(--dim); font-size: 13.5px; padding: 20px; }
.preview-empty .big { font-size: 40px; display: block; margin-bottom: 10px; opacity: 0.8; }
.preview-tools { display: flex; gap: 8px; margin-top: 14px; }
.preview-tools .btn { flex: 1; padding: 9px; font-size: 13px; }
.stage-meta { margin-top: 14px; display: grid; gap: 8px; font-size: 13px; }
.stage-meta div { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); }
.stage-meta b { color: var(--text); font-weight: 700; }

.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 8px; color: var(--muted); }
.field .hint { font-size: 12.5px; color: var(--dim); margin-top: 7px; }
.input, .textarea, .select {
  width: 100%; padding: 13px 15px; border-radius: 14px;
  background: rgba(0, 0, 0, 0.3); border: 1px solid var(--border); color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s; outline: none;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: rgba(124, 92, 255, 0.75); box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.16); background: rgba(0, 0, 0, 0.42);
}
.textarea { min-height: 120px; resize: vertical; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; }
.input-big { font-size: 22px; font-weight: 700; text-align: center; letter-spacing: 0.04em; padding: 18px; }
.counter { float: right; font-weight: 600; color: var(--dim); }

.tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.tab {
  padding: 9px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 700; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted); transition: 0.2s;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--grad-soft); border-color: rgba(124, 92, 255, 0.5); color: var(--text); }

/* template gallery */
.gallery-tools { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.gallery-tools .input { flex: 1; min-width: 180px; }
.tpl-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.tpl {
  position: relative; border-radius: 16px; border: 1px solid var(--border); background: var(--surface);
  padding: 10px 8px 9px; cursor: pointer; text-align: center; transition: 0.24s var(--ease); overflow: hidden;
}
.tpl:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--surface-2); }
.tpl.selected { border-color: rgba(124, 92, 255, 0.85); box-shadow: 0 0 0 2px rgba(124, 92, 255, 0.35), 0 14px 30px rgba(124, 92, 255, 0.28); }
.tpl-anim { aspect-ratio: 1; border-radius: 12px; background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.07), transparent 70%); display: grid; place-items: center; overflow: hidden; }
.tpl-anim > div { width: 100%; height: 100%; }
.tpl-name { font-size: 12px; font-weight: 700; margin-top: 7px; color: var(--muted); }
.tpl.selected .tpl-name { color: var(--text); }
.tpl-check {
  position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--grad); color: #08080f; display: grid; place-items: center; font-size: 12px; font-weight: 900;
  opacity: 0; transform: scale(0.6); transition: 0.22s var(--ease);
}
.tpl.selected .tpl-check { opacity: 1; transform: scale(1); }
.skeleton {
  aspect-ratio: 1; border-radius: 12px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.04) 75%);
  background-size: 440px 100%; animation: shimmer 1.3s infinite linear;
}
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 18px; }
.pager span { font-size: 13px; color: var(--muted); }

/* colors */
.color-row { margin-bottom: 20px; }
.color-row > label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 10px; }
.swatches { display: flex; gap: 9px; flex-wrap: wrap; }
.swatch {
  width: 40px; height: 40px; border-radius: 12px; cursor: pointer; border: 2px solid transparent;
  transition: 0.2s var(--ease); position: relative; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.swatch:hover { transform: scale(1.12); }
.swatch.active { border-color: #fff; box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.5); }
.hex-row { display: flex; gap: 10px; margin-top: 12px; }
.hex-row .input { font-family: "JetBrains Mono", monospace; letter-spacing: 0.06em; text-transform: uppercase; }
input[type="color"] {
  width: 52px; height: 46px; padding: 3px; border-radius: 12px; border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.3); cursor: pointer;
}

/* result */
.result { text-align: center; animation: pop 0.4s var(--ease); }
.result h2 { font-size: 25px; letter-spacing: -0.02em; }
.result-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 15px; border-radius: 999px;
  background: rgba(47, 212, 127, 0.14); border: 1px solid rgba(47, 212, 127, 0.4);
  color: #b6f5d5; font-weight: 700; font-size: 13px; margin-bottom: 14px;
}
.pay-box { border-radius: var(--radius); border: 1px solid rgba(255, 176, 32, 0.35); background: rgba(255, 176, 32, 0.08); padding: 20px; margin-top: 18px; }
.pay-box h4 { font-size: 16px; margin-bottom: 6px; }
.pay-price { font-size: 30px; font-weight: 850; letter-spacing: -0.02em; }

/* ---------- ADMIN ---------- */
.admin-layout { display: grid; grid-template-columns: 258px minmax(0, 1fr); gap: 22px; align-items: start; }
.admin-side {
  position: sticky; top: calc(var(--nav-h) + 18px);
  border-radius: var(--radius-lg); border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(16px); padding: 16px; box-shadow: var(--shadow);
}
.admin-side .side-title {
  font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--dim); padding: 6px 10px 10px;
}
.side-link {
  display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: 13px;
  font-size: 14px; font-weight: 650; color: var(--muted); cursor: pointer; transition: 0.2s var(--ease);
  border: 1px solid transparent; margin-bottom: 3px;
}
.side-link:hover { background: var(--surface); color: var(--text); }
.side-link.active { background: var(--grad-soft); border-color: rgba(124, 92, 255, 0.45); color: var(--text); }
.side-link .ic { width: 22px; text-align: center; font-size: 16px; }
.admin-main { min-height: 60vh; }
.admin-view { animation: pop 0.32s var(--ease); }

.stat-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 20px; }
.stat {
  padding: 19px 21px; border-radius: var(--radius); border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)); position: relative; overflow: hidden;
}
.stat::after {
  content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%;
  background: var(--grad); filter: blur(38px); opacity: 0.28;
}
.stat .k { font-size: 12px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--dim); }
.stat .v { font-size: 30px; font-weight: 850; letter-spacing: -0.03em; margin-top: 5px; }
.stat .s { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  text-align: left; padding: 13px 15px; font-size: 11.5px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--dim); background: rgba(255, 255, 255, 0.035); white-space: nowrap;
}
tbody td { padding: 12px 15px; border-top: 1px solid var(--border); vertical-align: middle; }
tbody tr { transition: background 0.18s; }
tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
td .mono { font-size: 12.5px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 700; border: 1px solid var(--border); background: var(--surface); white-space: nowrap;
}
.pill-ok { background: rgba(47, 212, 127, 0.14); border-color: rgba(47, 212, 127, 0.4); color: #b6f5d5; }
.pill-warn { background: rgba(255, 176, 32, 0.14); border-color: rgba(255, 176, 32, 0.4); color: #ffe0a8; }
.pill-danger { background: rgba(255, 84, 112, 0.14); border-color: rgba(255, 84, 112, 0.4); color: #ffc2cd; }
.pill-info { background: rgba(0, 212, 255, 0.12); border-color: rgba(0, 212, 255, 0.35); color: #b7ecff; }
.pill-muted { color: var(--dim); }

.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.inline-form .field { margin-bottom: 0; flex: 1; min-width: 160px; }

.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar .input { max-width: 300px; }

.chart { display: flex; align-items: flex-end; gap: 5px; height: 130px; margin-top: 10px; }
.chart .bar { flex: 1; border-radius: 6px 6px 3px 3px; background: var(--grad); min-height: 4px; opacity: 0.85; transition: 0.25s; position: relative; }
.chart .bar:hover { opacity: 1; }
.chart .bar span {
  position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 6px;
  font-size: 11px; font-weight: 700; background: rgba(0, 0, 0, 0.8); padding: 2px 7px; border-radius: 6px;
  opacity: 0; transition: 0.2s; white-space: nowrap;
}
.chart .bar:hover span { opacity: 1; }

.activity { display: grid; gap: 9px; max-height: 330px; overflow-y: auto; }
.activity-item {
  display: flex; gap: 11px; align-items: baseline; padding: 9px 12px; border-radius: 11px;
  background: rgba(255, 255, 255, 0.035); font-size: 13px;
}
.activity-item time { color: var(--dim); font-size: 11.5px; min-width: 46px; }

/* ---------- MODAL / TOAST ---------- */
.modal-back {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px;
  background: rgba(3, 3, 10, 0.72); backdrop-filter: blur(8px); animation: pop 0.25s var(--ease);
}
.modal {
  width: min(460px, 100%); border-radius: var(--radius-lg); border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, #14142a, #0b0b18); box-shadow: var(--shadow-lg); overflow: hidden;
}
.modal-head { padding: 22px 24px 0; }
.modal-head h3 { font-size: 20px; letter-spacing: -0.02em; }
.modal-head p { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.modal-body { padding: 20px 24px; display: grid; gap: 14px; }
.modal-foot { padding: 0 24px 22px; display: flex; gap: 10px; }
.modal-foot .btn { flex: 1; }

.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 120; display: grid; gap: 10px; max-width: min(360px, calc(100% - 36px)); }
.toast {
  display: flex; gap: 11px; align-items: flex-start; padding: 13px 16px; border-radius: 14px;
  background: rgba(20, 20, 42, 0.96); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg);
  font-size: 13.5px; animation: pop 0.3s var(--ease); backdrop-filter: blur(10px);
}
.toast.ok { border-color: rgba(47, 212, 127, 0.5); }
.toast.err { border-color: rgba(255, 84, 112, 0.5); }
.toast.warn { border-color: rgba(255, 176, 32, 0.5); }
.toast .ic { font-size: 16px; }

.alert { padding: 13px 16px; border-radius: 14px; font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; }
.alert-info { background: rgba(0, 212, 255, 0.1); border: 1px solid rgba(0, 212, 255, 0.32); color: #cdefff; }
.alert-warn { background: rgba(255, 176, 32, 0.1); border: 1px solid rgba(255, 176, 32, 0.32); color: #ffe6bb; }
.alert-err { background: rgba(255, 84, 112, 0.1); border: 1px solid rgba(255, 84, 112, 0.32); color: #ffd0d8; }

/* ---------- FOOTER ---------- */
.footer { border-top: 1px solid var(--border); padding: 34px 0; margin-top: 40px; color: var(--dim); font-size: 13px; }
.footer-inner { display: flex; gap: 18px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer a:hover { color: var(--text); }

.avatar {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; font-size: 14px;
  background: var(--grad); color: #08080f;
}

.skel-line { height: 12px; border-radius: 6px; background: rgba(255, 255, 255, 0.07); }

@media (max-width: 1080px) {
  .wizard { grid-template-columns: 1fr; }
  .stage { position: static; order: -1; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-side { position: static; display: flex; gap: 6px; overflow-x: auto; padding: 10px; }
  .admin-side .side-title { display: none; }
  .side-link { margin-bottom: 0; white-space: nowrap; }
}
@media (max-width: 760px) {
  .container { width: min(1240px, calc(100% - 26px)); }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: rgba(9, 9, 20, 0.98); border-bottom: 1px solid var(--border); padding: 12px; gap: 4px;
    transform: translateY(-140%); transition: transform 0.32s var(--ease); z-index: 55;
  }
  .nav-links.open { transform: translateY(0); }
  .panel-body, .panel-head, .panel-foot { padding-inline: 18px; }
  .hero { padding-top: 46px; }
  .btn-hero { padding: 16px 30px; font-size: 17px; }
}

input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 999px;
  background: linear-gradient(90deg, #7c5cff, #00d4ff); outline: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 3px solid #7c5cff; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5); cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid #7c5cff; cursor: pointer;
}
