/* ─── MiniPay — спільні стилі ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --c-bg:       #0b0f1a;
  --c-surface:  #131929;
  --c-card:     #1a2235;
  --c-border:   #243050;
  --c-primary:  #3b82f6;
  --c-accent:   #06d6a0;
  --c-text:     #e2e8f0;
  --c-muted:    #8898aa;
  --c-warn:     #f59e0b;
  --c-danger:   #ef4444;
  --radius:     14px;
  --shadow:     0 8px 32px rgba(0,0,0,.45);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  /* Sticky footer: коли контенту мало — footer прижатий до низу viewport. */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body > footer { margin-top: auto; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* Container — задає сторінка через --container-max */
.container {
  max-width: var(--container-max, 1200px);
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Nav (sticky, спільний для всіх внутрішніх сторінок) ────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11,15,26,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-svg { width: 36px; height: 36px; }
.logo-text { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
.logo-text span { color: var(--c-accent); }
.nav-links { display: flex; gap: 24px; flex-wrap: wrap; }
.nav-links a {
  color: var(--c-muted);
  font-weight: 500;
  font-size: .9rem;
  transition: color .2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--c-text); }
@media (max-width: 860px) { .nav-links { display: none; } }

/* ─── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 10px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  padding: 12px 20px;
  transition: transform .15s, box-shadow .15s, opacity .15s;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #06d6a0);
  color: #fff;
}
.btn-primary:hover { box-shadow: 0 10px 28px rgba(59,130,246,.4); }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--c-border);
  color: var(--c-text);
}
.btn-outline:hover { border-color: var(--c-primary); box-shadow: 0 10px 24px rgba(59,130,246,.2); }
/* Compact nav-sized button */
.btn-sm { padding: 10px 18px; font-size: .9rem; }
.btn-danger {
  background: rgba(239,68,68,.16);
  border: 1px solid rgba(239,68,68,.5);
  color: #fecaca;
}
.btn-warn {
  background: rgba(245,158,11,.16);
  border: 1px solid rgba(245,158,11,.45);
  color: #fde68a;
}

/* ─── Forms ───────────────────────────────────────────────────── */
input, select, textarea {
  width: 100%;
  background: #0f1727;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  color: var(--c-text);
  padding: 11px 12px;
  font: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(59,130,246,.55);
  box-shadow: 0 0 0 2px rgba(59,130,246,.22);
}
label {
  display: block;
  font-size: .83rem;
  color: var(--c-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

/* ─── Status ──────────────────────────────────────────────────── */
.status {
  margin-top: 14px;
  color: var(--c-muted);
  font-size: .92rem;
}
.status.err { color: #fda4af; }
.status.ok { color: var(--c-accent); }
.status.warn { color: var(--c-warn); }

/* ─── Card ────────────────────────────────────────────────────── */
.card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

/* ─── Mono (technical text / IDs) ─────────────────────────────── */
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .82rem;
  word-break: break-word;
}

/* ─── Footer ──────────────────────────────────────────────────── */
footer {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: 40px 0;
  color: var(--c-muted);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: .86rem;
}
.footer-copy { font-size: .84rem; color: var(--c-muted); }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a {
  font-size: .84rem;
  color: var(--c-muted);
  transition: color .2s;
}
.footer-links a:hover { color: var(--c-text); }

/* ─── Raw JSON output box ─────────────────────────────────────── */
.raw {
  margin-top: 14px;
  border-radius: 10px;
  border: 1px solid var(--c-border);
  background: #0f1727;
  color: #b9c4d3;
  padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .8rem;
  max-height: 240px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
