:root {
  --brand: #2563eb;
  --brand-light: #eff6ff;
  --brand-mid: #bfdbfe;
  --success: #059669;
  --success-light: #ecfdf5;
  --warn: #d97706;
  --warn-light: #fffbeb;
  --surface: #ffffff;
  --bg: #f8fafc;
  --border: #e2e8f0;
  --border-focus: #93c5fd;
  --text: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);
  --font: "Plus Jakarta Sans", sans-serif;
  --mono: "JetBrains Mono", monospace;
  --ssl-color: #2563eb;
  --bkash-color: #059669;
  --stripe-color: #7c3aed;
}
/* ── General ─────────────────────────────────────────────── */
body {
  font-family:
    "Segoe UI",
    system-ui,
    -apple-system,
    sans-serif;
  background: #f5f7fa;
}

/* ── Landing Page ────────────────────────────────────────── */
.landing-nav {
  background: transparent !important;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

.landing-nav-links .nav-link,
.landing-mobile-nav-links .nav-link {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
}

.landing-nav-links .nav-link:hover,
.landing-mobile-nav-links .nav-link:hover {
  color: #ffffff;
}

.landing-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.5);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 1040;
}

.landing-nav-backdrop.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.landing-mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(82vw, 320px);
  min-height: 100dvh;
  background: linear-gradient(180deg, #0d1f45 0%, #0a3d91 100%);
  transform: translateX(-100%);
  transition: transform 0.28s ease;
  z-index: 1050;
  padding: 20px 18px;
}

.landing-mobile-nav.show {
  transform: translateX(0);
}

body.landing-nav-open {
  overflow: hidden;
}

.hero-section {
  background: linear-gradient(135deg, #0d6efd 0%, #0a3d91 100%);
  min-height: 100vh;
  padding-top: 80px;
}

.login-page {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  width: 260px;
  min-height: 100vh;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  transition: transform 0.3s;
}

.sidebar-mobile-toggle {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 110;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease,
    transform 0.2s ease;
}

body.sidebar-open .sidebar-mobile-toggle {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 99;
}

.sidebar-backdrop.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.sidebar .nav-link {
  border-radius: 8px;
  margin-bottom: 2px;
  padding: 10px 14px;
  font-size: 0.9rem;
}

.sidebar .nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
  background: rgba(13, 110, 253, 0.7) !important;
}

/* ── Main content ────────────────────────────────────────── */
.main-content {
  min-height: 100vh;
  background: #f5f7fa;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 5;
}

/* ── Cards ────────────────────────────────────────────────── */
.stat-card {
  border-radius: 12px;
  transition: transform 0.15s;
}

.stat-card:hover {
  transform: translateY(-2px);
}

.quick-link-card {
  border-radius: 12px;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}

.quick-link-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

/* ── Tables ───────────────────────────────────────────────── */
.table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  color: #64748b;
}

.table td {
  vertical-align: middle;
}

/* ── Docs page ────────────────────────────────────────────── */
.docs-sidebar {
  max-height: calc(100dvh - 96px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.docs-sidebar .nav-link {
  font-size: 0.875rem;
  color: #475569;
  padding: 6px 0;
}

.docs-sidebar .nav-link:hover {
  color: #0d6efd;
}

.docs-lead-card {
  border: 1px solid #dbeafe;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  border-radius: 12px;
  padding: 16px;
}

.docs-grid-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.docs-grid-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
}

.setup-gateway-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.setup-gateway-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.setup-gateway-badge.stripe {
  background: #f3e8ff;
  color: #6d28d9;
}

.setup-gateway-badge.sslcommerz {
  background: #dbeafe;
  color: #1d4ed8;
}

.setup-gateway-badge.bkash {
  background: #ffe4ef;
  color: #be185d;
}

.setup-gateway-badge.crypto {
  background: #ecfeff;
  color: #0e7490;
}

.setup-step-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.setup-step-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.setup-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 28px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.setup-screenshot-box {
  margin-top: 10px;
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px 12px;
  color: #475569;
  font-size: 0.875rem;
}

.setup-screenshot-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  border-radius: 8px;
}

.setup-keymap {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  padding: 12px;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .landing-mobile-nav-links .nav-link {
    padding: 12px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    transform: translateX(-100%);
    width: min(82vw, 300px);
    min-height: 100dvh;
    height: 100dvh;
  }

  .sidebar.show {
    transform: translateX(0);
  }

  body.sidebar-open {
    overflow: hidden;
  }

  .top-bar {
    padding-left: 64px !important;
  }

  .main-content {
    width: 100%;
  }

  .docs-sidebar {
    max-height: none;
    overflow-y: visible;
  }

  .docs-grid-cards {
    grid-template-columns: 1fr;
  }
}

/* ── Badge fixes ──────────────────────────────────────────── */
.badge {
  font-weight: 500;
}

/* ── Code blocks in docs ──────────────────────────────────── */
pre code {
  font-size: 0.85rem;
}
