/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  --pink: #ff1f8f;
  --pink-dim: #ff1f8f;
  --pink-glow: rgba(255, 31, 143, 0.12);
  --pink-faint: rgba(255, 31, 143, 0.06);

  --bg: #0d0d0d;
  --bg-1: #111111;
  --bg-2: #161616;
  --bg-3: #1c1c1c;
  --bg-4: #222222;

  --border: rgba(255, 255, 255, 0.07);
  --border-2: rgba(255, 255, 255, 0.12);

  --text: #e8e8e4;
  --text-2: #a0a09a;
  --text-3: #666660;
  --text-inv: #0d0d0d;

  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', monospace;

  --radius: 6px;
  --radius-lg: 10px;
  --sidebar-w: 280px;
  --topbar-h: 56px;

  --transition: 150ms ease;
}

/* ── RESET ──────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.75;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── LAYOUT ─────────────────────────────────────────────── */
.layout-main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── SIDEBAR ────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-1);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-mark {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.logo-product {
  max-width: 100px;
  max-height: 20px;
  object-fit: contain;
}

.logo-section {
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1;
}

.sidebar-close {
  display: none;
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
}

/* search */
.sidebar-search {
  position: relative;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-search input {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 7px 32px 7px 12px;
  outline: none;
  transition: border-color var(--transition);
}

.sidebar-search input:focus {
  border-color: var(--pink-dim);
}

.sidebar-search input::placeholder {
  color: var(--text-3);
}

.search-icon {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  font-size: 16px;
  pointer-events: none;
}

.search-results {
  display: none;
  position: absolute;
  top: calc(100% - 4px);
  left: 16px;
  right: 16px;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  max-height: 280px;
  overflow-y: auto;
  z-index: 200;
}

.search-results.active {
  display: block;
}

.search-result-item {
  display: block;
  padding: 10px 14px;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: var(--bg-4);
}

.result-title {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  display: block;
}

.result-section {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 2px;
  display: block;
}

.result-title mark {
  background: var(--pink-glow);
  color: var(--pink);
  border-radius: 2px;
  padding: 0 1px;
}

/* nav */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-4) transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: var(--bg-4);
  border-radius: 2px;
}

.nav-group {
  margin-bottom: 4px;
}

.nav-group-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 12px 20px 4px;
}

.nav-group-vendor {
  color: var(--pink-dim);
}

.nav-group-admin {
  color: #7c9abf;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 20px;
  font-size: 13.5px;
  color: var(--text-2);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all var(--transition);
  line-height: 1.3;
}

.nav-link:hover {
  color: var(--text);
  background: var(--bg-2);
  border-left-color: var(--border-2);
}

.nav-link.active {
  color: var(--pink);
  background: var(--pink-faint);
  border-left-color: var(--pink);
  font-weight: 500;
}

.nav-step {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  min-width: 20px;
  flex-shrink: 0;
}

.nav-link.active .nav-step {
  color: var(--pink-dim);
}

.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-3);
  flex-shrink: 0;
}

.sidebar-badge {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--pink-dim);
}

/* ── TOPBAR ─────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 32px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-1);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-brand {
  display: none;
  align-items: center;
}

.topbar-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text-2);
  border-radius: 2px;
  transition: background var(--transition);
}

.menu-toggle:hover span {
  background: var(--text);
}

.topbar-breadcrumb {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.breadcrumb-section {
  color: var(--text-3);
  font-size: 12px;
}

.breadcrumb-sep {
  color: var(--text-3);
  font-size: 11px;
}

.breadcrumb-page {
  color: var(--text-2);
  font-weight: 500;
}

.topbar-home {
  font-size: 12px;
  color: var(--text-3);
  text-decoration: none;
  transition: color var(--transition);
}

.topbar-home:hover {
  color: var(--pink);
}

/* ── CONTENT ────────────────────────────────────────────── */
.content {
  flex: 1;
  padding: 48px 32px 64px;
  max-width: 820px;
}

.content-inner {
  animation: fadeIn 200ms ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── TYPOGRAPHY ─────────────────────────────────────────── */
.content h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.content h1::after {
  content: '';
  display: block;
  width: 32px;
  height: 2px;
  background: var(--pink);
  margin-top: 10px;
}

.content h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 48px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.01em;
}

.content h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 32px;
  margin-bottom: 12px;
  font-family: var(--font-body);
}

.content h4 {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  margin-top: 20px;
  margin-bottom: 8px;
  font-family: var(--font-body);
}

.content p {
  color: var(--text-2);
  margin-bottom: 16px;
  font-weight: 300;
}

.content strong {
  color: var(--text);
  font-weight: 500;
}

.content a {
  color: var(--pink);
  text-decoration: none;
  border-bottom: 1px solid var(--pink-dim);
  transition: border-color var(--transition);
}

.content a:hover {
  border-color: var(--pink);
}

/* ── LISTS ──────────────────────────────────────────────── */
.content ul,
.content ol {
  padding-left: 20px;
  margin-bottom: 16px;
}

.content li {
  color: var(--text-2);
  margin-bottom: 6px;
  font-weight: 300;
}

.content li::marker {
  color: var(--pink-dim);
}

.content ol li::marker {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
}

/* ── CODE ───────────────────────────────────────────────── */
.content code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: var(--bg-3);
  color: var(--pink);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 6px;
}

.content pre {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  overflow-x: auto;
  margin-bottom: 20px;
  position: relative;
}

.content pre::before {
  content: '$ ';
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 12px;
  position: absolute;
  top: 8px;
  right: 14px;
}

.content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  color: var(--text-2);
}

/* ── BLOCKQUOTE / CALLOUT ───────────────────────────────── */
.content blockquote {
  border-left: 3px solid var(--pink-dim);
  background: var(--pink-faint);
  margin: 20px 0;
  padding: 14px 18px;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.content blockquote p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-2);
}

.content blockquote strong {
  color: var(--pink);
}

/* placeholder de backend */
.content blockquote p:has(strong[data-placeholder]),
.content blockquote:has(strong) {
  border-left-color: #cc8800;
  background: rgba(204, 136, 0, 0.06);
}

/* ── TABLES ─────────────────────────────────────────────── */
.content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 13.5px;
}

.content th {
  background: var(--bg-3);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-2);
}

.content td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  font-weight: 300;
  vertical-align: top;
}

.content tr:last-child td {
  border-bottom: none;
}

.content tr:hover td {
  background: var(--bg-2);
}

/* ── HR ─────────────────────────────────────────────────── */
.content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

/* ── PAGE INTRO BADGE ───────────────────────────────────── */
.page-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px;
  margin-bottom: 16px;
}

.page-badge.vendor {
  color: var(--pink-dim);
  border-color: var(--pink-dim);
}

.page-badge.admin {
  color: #7c9abf;
  border-color: #7c9abf;
}

/* ── NEXT/PREV NAV ──────────────────────────────────────── */
.page-nav {
  display: flex;
  gap: 16px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.page-nav-link {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all var(--transition);
}

.page-nav-link:hover {
  border-color: var(--pink-dim);
  background: var(--pink-faint);
}

.page-nav-link.next {
  text-align: right;
}

.page-nav-label {
  font-size: 11px;
  color: var(--text-3);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.page-nav-title {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

/* ── HOME HERO ──────────────────────────────────────────── */
.home-hero {
  margin-bottom: 48px;
}

.hero-logo {
  max-height: 40px;
  width: auto;
  margin-bottom: 8px;
  display: block;
}

.home-hero h1 {
  font-size: 2.4rem;
  margin-bottom: 16px;
}

.home-hero p {
  font-size: 16px;
  color: var(--text-2);
  max-width: 520px;
}

.profile-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 32px 0 48px;
}

.profile-card {
  display: block;
  padding: 24px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all 200ms ease;
  position: relative;
  overflow: hidden;
}

.profile-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
}

.profile-card.vendor::before {
  background: var(--pink);
}

.profile-card.admin::before {
  background: #4a7cbf;
}

.profile-card:hover {
  border-color: var(--border-2);
  transform: translateY(-2px);
}

.profile-card:hover.vendor {
  border-color: var(--pink-dim);
}

.card-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.profile-card.vendor .card-label {
  color: var(--pink-dim);
}

.profile-card.admin .card-label {
  color: #7c9abf;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  display: block;
}

.card-desc {
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.5;
  font-weight: 300;
}

.card-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.card-step {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 7px;
}

/* ── OVERLAY ────────────────────────────────────────────── */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99;
}

/* ── FOOTER ─────────────────────────────────────────────── */
.site-footer {
  padding: 20px 32px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-3);
  display: flex;
  gap: 12px;
  align-items: center;
  font-family: var(--font-mono);
}

.footer-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  opacity: 0.8;
}

.footer-sep {
  color: var(--border-2);
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 32px rgba(0, 0, 0, 0.5);
  }

  .sidebar-close {
    display: block;
  }

  .layout-main {
    margin-left: 0;
  }

  .menu-toggle {
    display: flex;
  }

  .overlay.active {
    display: block;
  }

  .content {
    padding: 32px 20px 48px;
  }

  .topbar {
    padding: 0 20px;
  }

  .topbar-brand {
    display: flex;
  }

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

  .page-nav {
    flex-direction: column;
  }
}