﻿/* =========================================================
   PayRu — Global Design System
   ========================================================= */

:root {
  /* Backgrounds */
  --bg: #080B14;
  --bg-soft: #0D1220;
  --navbar-bg: rgba(8, 11, 20, 0.75);
  --surface: #131A2C;
  --surface-2: #1A2238;
  --surface-hover: #202A45;
  --border: #232C46;
  --border-soft: #1B2336;

  /* Text */
  --text: #F4F6FB;
  --text-muted: #8C96B8;
  --text-dim: #5C6688;

  /* Brand */
  --primary: #00E0A8;
  --primary-dark: #00B888;
  --primary-soft: rgba(0, 224, 168, 0.12);
  --accent: #7C6CF6;
  --accent-soft: rgba(124, 108, 246, 0.12);
  --gradient: linear-gradient(135deg, #00E0A8 0%, #7C6CF6 100%);

  /* Status */
  --success: #00E0A8;
  --success-soft: rgba(0, 224, 168, 0.12);
  --danger: #FF5C7C;
  --danger-soft: rgba(255, 92, 124, 0.12);
  --warning: #FFC247;
  --warning-soft: rgba(255, 194, 71, 0.12);
  --info: #4EA1FF;
  --info-soft: rgba(78, 161, 255, 0.12);

  /* Shape & motion */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-full: 999px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.45);
  --transition: 0.2s ease;

  /* Layout */
  --header-h: 76px;
  --sidebar-w: 260px;
  --container: 1200px;
}

/* ---------- Light theme ---------- */
:root[data-theme="light"] {
  /* Backgrounds */
  --bg: #FFFFFF;
  --bg-soft: #F3F5FA;
  --navbar-bg: rgba(255, 255, 255, 0.75);
  --surface: #FFFFFF;
  --surface-2: #F0F2F8;
  --surface-hover: #E7EBF3;
  --border: #E2E6F0;
  --border-soft: #ECEFF5;

  /* Text */
  --text: #10172A;
  --text-muted: #5B6478;
  --text-dim: #8A93AC;

  /* Brand */
  --primary: #00A87A;
  --primary-dark: #00875F;
  --primary-soft: rgba(0, 168, 122, 0.12);
  --accent: #6A4FE0;
  --accent-soft: rgba(106, 79, 224, 0.1);
  --gradient: linear-gradient(135deg, #00946C 0%, #7C6CF6 100%);

  /* Status */
  --success: #00A87A;
  --success-soft: rgba(0, 168, 122, 0.12);
  --danger: #E0364F;
  --danger-soft: rgba(224, 54, 79, 0.1);
  --warning: #C8860D;
  --warning-soft: rgba(200, 134, 13, 0.1);
  --info: #2F7BD6;
  --info-soft: rgba(47, 123, 214, 0.1);

  /* Shadows */
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.1);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

img, svg {
  display: block;
  max-width: 100%;
}

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

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Sora", "Inter", sans-serif;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 90px 0;
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 14px;
}

.section-head p {
  color: var(--text-muted);
  font-size: 16px;
}

.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.grid {
  display: grid;
  gap: 24px;
}

.flex {
  display: flex;
  align-items: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
}

.btn-sm {
  padding: 9px 18px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--gradient);
  color: #06140F;
  box-shadow: 0 8px 24px rgba(0, 224, 168, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 224, 168, 0.35);
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--primary);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--surface-2);
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(255, 92, 124, 0.25);
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn-warning {
  background: var(--warning-soft);
  color: var(--warning);
  border-color: rgba(255, 194, 71, 0.25);
}

.btn-warning:hover {
  background: var(--warning);
  color: #06140F;
}

.btn-success {
  background: var(--success-soft);
  color: var(--success);
  border-color: rgba(0, 224, 168, 0.25);
}

.btn-success:hover {
  background: var(--success);
  color: #06140F;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-icon {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: var(--radius-full);
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.card-sm {
  padding: 20px;
  border-radius: var(--radius);
}

/* ---------- Forms ---------- */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.form-label .optional {
  color: var(--text-dim);
  font-weight: 400;
}

.form-control {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  transition: all var(--transition);
}

.form-control::placeholder {
  color: var(--text-dim);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%238C96B8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}

textarea.form-control {
  resize: vertical;
  min-height: 110px;
}

.input-wrap {
  position: relative;
}

.input-wrap .form-control {
  padding-right: 46px;
}

.input-wrap.has-prefix .form-control {
  padding-left: 46px;
}

.input-icon-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 18px;
  display: flex;
  align-items: center;
  transition: color var(--transition);
}

.input-icon-btn:hover {
  color: var(--text);
}

.input-prefix {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 18px;
}

.form-hint {
  font-size: 12.5px;
  color: var(--text-dim);
  margin-top: 6px;
}

.form-error {
  font-size: 12.5px;
  color: var(--danger);
  margin-top: 6px;
  display: none;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
}

.checkbox-row input {
  margin-top: 3px;
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

/* ---------- Badges / Status pills ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  text-transform: capitalize;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-muted { background: var(--surface-2); color: var(--text-muted); }

/* ---------- Top Navigation (public pages) ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 250;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--navbar-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Sora", sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: var(--text);
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #06140F;
  flex-shrink: 0;
}

.logo span span {
  color: var(--primary);
}

/* ---------- Brand lockup ----------
   The PayRu wordmark image that replaced the old .logo-mark + text pair.
   Sized by context: 150px in navbars/sidebars, 220px where there's room. */
.logo img {
  display: block;
  width: 140px;      /* 55px tall — clears the 76px --header-h bar */
  max-width: 100%;
  height: auto;
}

.logo-lg img {
  width: 200px;      /* auth panels and cards, where there's room */
}

/* logo.png is drawn for light backgrounds — its navy wordmark sits at ~1.2:1
   against the dark theme, i.e. invisible. Inverting the lightness and spinning
   the hue back lands the wordmark on white and the "ru" on rgb(0,242,199),
   within a hair of --primary — so on dark it reads exactly like the white-Pay/
   teal-ru text logo it replaced. Drop this rule if a light-on-dark logo file
   is ever supplied. */
[data-theme="dark"] .logo img {
  filter: invert(1) hue-rotate(180deg) brightness(1.8);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 26px;
}

/* ---------- Theme toggle ---------- */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--surface-hover);
  color: var(--primary);
}

.theme-toggle .bx-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .bx-sun {
  display: block;
}

[data-theme="dark"] .theme-toggle .bx-moon {
  display: none;
}

.nav-close {
  display: none;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 18px;
  right: 20px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
}

.nav-drawer-footer {
  display: none;
}

.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 12, 0.6);
  z-index: 190;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.nav-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border-soft);
  padding: 64px 0 28px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}

.footer-about p {
  color: var(--text-muted);
  font-size: 14.5px;
  margin: 16px 0 20px;
  max-width: 320px;
}

.footer h4 {
  font-size: 15px;
  margin-bottom: 18px;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 14.5px;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
}

.social-row {
  display: flex;
  gap: 10px;
}

.social-row a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-muted);
  transition: all var(--transition);
}

.social-row a:hover {
  background: var(--gradient);
  color: #06140F;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  border-top: 1px solid var(--border-soft);
  font-size: 13.5px;
  color: var(--text-dim);
}

.footer-bottom .footer-legal {
  display: flex;
  gap: 24px;
}

.footer-bottom a:hover {
  color: var(--primary);
}

/* ---------- Misc shared ---------- */
.divider {
  height: 1px;
  background: var(--border-soft);
  margin: 24px 0;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  color: #06140F;
  flex-shrink: 0;
}

.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1000;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  max-width: 360px;
  transform: translateX(420px);
  opacity: 0;
  transition: all 0.35s ease;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.toast-error {
  border-left-color: var(--danger);
}

.toast.toast-warning {
  border-left-color: var(--warning);
}

.toast i {
  font-size: 20px;
  color: var(--primary);
}

.toast.toast-error i { color: var(--danger); }
.toast.toast-warning i { color: var(--warning); }

/* ---------- Coin icons ---------- */
.coin-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  font-family: "Sora", sans-serif;
}

.coin-icon.lg {
  width: 44px;
  height: 44px;
  font-size: 14px;
}

.coin-icon[data-asset="BTC"] { background: #F7931A; }
.coin-icon[data-asset="ETH"] { background: #627EEA; }
.coin-icon[data-asset="USDT"] { background: #26A17B; }
.coin-icon[data-asset="BNB"] { background: #F0B90B; color: #1a1a1a; }
.coin-icon[data-asset="USDC"] { background: #2775CA; }
.coin-icon[data-asset="NGN"] { background: var(--gradient); color: #06140F; }

/* ---------- Copy field ---------- */
.copy-field {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.copy-field span {
  flex: 1;
  font-size: 14px;
  font-family: "SFMono-Regular", Consolas, monospace;
  word-break: break-all;
  color: var(--text);
}

.copy-field button {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
  flex-shrink: 0;
}

.copy-field button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ---------- Empty state ---------- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 42px;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.empty-state h4 {
  color: var(--text);
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 14px;
}

/* ---------- Eye toggle ---------- */
.eye-toggle {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 19px;
  display: flex;
  align-items: center;
  transition: color var(--transition);
}

.eye-toggle:hover {
  color: var(--text);
}

.blurred {
  filter: blur(7px);
  user-select: none;
}

/* ---------- Steps (numbered) ---------- */
.step-number {
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  background: var(--gradient);
  color: #06140F;
  font-family: "Sora", sans-serif;
  font-weight: 800;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---------- Animations ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: fadeUp 0.6s ease both;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(300px, 82vw);
    height: 100vh;
    background: var(--bg-soft);
    border-left: 1px solid var(--border-soft);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 4px;
    padding: 88px 20px 28px;
    transform: translateX(100%);
    opacity: 1;
    transition: transform 0.3s ease;
    pointer-events: auto;
    z-index: 200;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    width: 100%;
    padding: 13px 14px;
    border-radius: var(--radius-sm);
    font-size: 15.5px;
  }

  .nav-links a:hover {
    background: var(--surface-2);
    color: var(--text);
  }

  .nav-links a.active {
    background: var(--primary-soft);
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
    font-weight: 700;
  }

  .nav-close {
    display: flex;
  }

  .nav-drawer-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-soft);
  }

  .nav-drawer-footer .btn {
    width: 100%;
    justify-content: center;
  }

  .nav-backdrop {
    display: block;
  }

  .nav-actions .btn {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  body.nav-open {
    overflow: hidden;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .section {
    padding: 60px 0;
  }
}
