/* ============================================
   MPay Network Wallet Documentation Site
   Global CSS Stylesheet
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* === CSS CUSTOM PROPERTIES === */
:root {
  /* Brand Colors */
  --color-primary: #2563eb;
  --color-secondary: #3b82f6;
  --color-accent: #60a5fa;
  --color-text-dark: #0f172a;
  --color-background: #ffffff;
  --color-surface: #eff6ff;
  --color-text: #2563eb;
  --color-text-secondary: #2563eb;
  --color-border: #bfdbfe;
  --color-success: #22c55e;
  --color-error: #ef4444;
  --color-warning: #f59e0b;

  /* Extended Palette */
  --color-primary-dark: #2563eb;
  --color-primary-darker: #2563eb;
  --color-primary-light: #93bbfd;
  --color-primary-lightest: #dbeafe;
  --color-surface-alt: #f8faff;
  --color-overlay: rgba(30, 58, 138, 0.5);
  --color-code-bg: #1e293b;
  --color-code-text: #e2e8f0;
  --color-highlight: #fef3c7;

  /* Typography */
  --font-primary: 'Inter', sans-serif;
  --font-heading: 'Inter', sans-serif;
  --font-mono:
    "JetBrains Mono", "Fira Code", "Cascadia Code", "Consolas", monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;

  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  /* Spacing Scale */
  --space-0: 0;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(30, 58, 138, 0.04);
  --shadow-sm:
    0 1px 3px rgba(30, 58, 138, 0.06), 0 1px 2px rgba(30, 58, 138, 0.04);
  --shadow-md:
    0 4px 6px -1px rgba(30, 58, 138, 0.07),
    0 2px 4px -2px rgba(30, 58, 138, 0.05);
  --shadow-lg:
    0 10px 15px -3px rgba(30, 58, 138, 0.08),
    0 4px 6px -4px rgba(30, 58, 138, 0.05);
  --shadow-xl:
    0 20px 25px -5px rgba(30, 58, 138, 0.1),
    0 8px 10px -6px rgba(30, 58, 138, 0.06);
  --shadow-2xl: 0 25px 50px -12px rgba(30, 58, 138, 0.15);
  --shadow-blue-glow:
    0 0 20px rgba(37, 99, 235, 0.15), 0 0 40px rgba(37, 99, 235, 0.08);
  --shadow-card-hover:
    0 12px 24px -4px rgba(30, 58, 138, 0.12),
    0 4px 8px -2px rgba(30, 58, 138, 0.06);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
  --transition-spring: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-Index Scale */
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-sidebar: 400;
  --z-overlay: 500;
  --z-modal: 600;
  --z-popover: 700;
  --z-tooltip: 800;
  --z-toast: 900;

  /* Layout */
  --header-height: 64px;
  --sidebar-width: 280px;
  --sidebar-width-collapsed: 60px;
  --container-max: 1280px;
  --container-narrow: 768px;
  --container-wide: 1440px;
  --content-max-width: 860px;

  /* Theme Tokens (Light Default) */
  --theme-bg: #ffffff;
  --theme-bg-elevated: #ffffff;
  --theme-surface: #f8fafc;
  --theme-surface-soft: #f1f5f9;
  --theme-text: #0f172a;
  --theme-text-muted: #475569;
  --theme-border: #e2e8f0;
  --theme-overlay: rgba(2, 6, 23, 0.55);
  --theme-shadow:
    0 10px 30px rgba(15, 23, 42, 0.08),
    0 2px 8px rgba(15, 23, 42, 0.05);
  --theme-shadow-soft:
    0 6px 18px rgba(15, 23, 42, 0.08),
    0 1px 3px rgba(15, 23, 42, 0.05);
  --theme-input-bg: #ffffff;
  --theme-focus: rgba(96, 165, 250, 0.35);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--theme-text-muted);
  background-color: var(--theme-bg);
  min-height: 100vh;
  overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

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

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
  font-family: var(--font-heading);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--color-text);
}

p {
  overflow-wrap: break-word;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-8) 0;
}

/* === IMPORT FONTS === */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap");

/* === TYPOGRAPHY === */
h1 {
  font-size: var(--text-4xl);
  font-weight: var(--font-extrabold);
  letter-spacing: -0.025em;
  margin-bottom: var(--space-6);
}

h2 {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-5);
}

h3 {
  font-size: var(--text-2xl);
  font-weight: var(--font-semibold);
  letter-spacing: -0.015em;
  margin-bottom: var(--space-4);
}

h4 {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-3);
}

h5 {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-3);
}

h6 {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-2);
}

.text-xs {
  font-size: var(--text-xs);
}

.text-sm {
  font-size: var(--text-sm);
}

.text-base {
  font-size: var(--text-base);
}

.text-lg {
  font-size: var(--text-lg);
}

.text-xl {
  font-size: var(--text-xl);
}

.text-2xl {
  font-size: var(--text-2xl);
}

.text-3xl {
  font-size: var(--text-3xl);
}

.text-4xl {
  font-size: var(--text-4xl);
}

.text-5xl {
  font-size: var(--text-5xl);
}

.text-6xl {
  font-size: var(--text-6xl);
}

.font-normal {
  font-weight: var(--font-normal);
}

.font-medium {
  font-weight: var(--font-medium);
}

.font-semibold {
  font-weight: var(--font-semibold);
}

.font-bold {
  font-weight: var(--font-bold);
}

.text-primary {
  color: var(--color-text);
}

.text-secondary {
  color: var(--color-text-secondary);
}

.text-accent {
  color: var(--color-accent);
}

.text-muted {
  color: #64748b;
}

.text-white {
  color: #ffffff;
}

.text-success {
  color: var(--color-success);
}

.text-error {
  color: var(--color-error);
}

.text-warning {
  color: var(--color-warning);
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

/* === LAYOUT UTILITIES === */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

.container-narrow {
  max-width: var(--container-narrow);
}

.container-wide {
  max-width: var(--container-wide);
}

.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  padding-top: var(--header-height);
}

.docs-layout {
  display: flex;
  min-height: calc(100vh - var(--header-height));
}

.docs-sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  padding: var(--space-6) var(--space-4);
  z-index: var(--z-sidebar);
  transition: transform var(--transition-base);
}

.docs-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: var(--space-8) var(--space-10) !important;
  max-width: calc(100% - var(--sidebar-width));
  margin-top: 60px;
}

.docs-content-inner {
  max-width: var(--content-max-width);
}

/* Flexbox Utilities */
.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.flex-col {
  flex-direction: column;
}

.flex-row {
  flex-direction: row;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-1 {
  flex: 1;
}

.flex-shrink-0 {
  flex-shrink: 0;
}

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

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.items-stretch {
  align-items: stretch;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-start {
  justify-content: flex-start;
}

.justify-end {
  justify-content: flex-end;
}

.gap-1 {
  gap: var(--space-1);
}

.gap-2 {
  gap: var(--space-2);
}

.gap-3 {
  gap: var(--space-3);
}

.gap-4 {
  gap: var(--space-4);
}

.gap-5 {
  gap: var(--space-5);
}

.gap-6 {
  gap: var(--space-6);
}

.gap-8 {
  gap: var(--space-8);
}

.gap-10 {
  gap: var(--space-10);
}

.gap-12 {
  gap: var(--space-12);
}

/* Grid Utilities */
.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, 1fr);
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-cols-12 {
  grid-template-columns: repeat(12, 1fr);
}

/* Spacing Utilities */
.m-0 {
  margin: 0;
}

.m-auto {
  margin: auto;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.mb-1 {
  margin-bottom: var(--space-1);
}

.mb-2 {
  margin-bottom: var(--space-2);
}

.mb-3 {
  margin-bottom: var(--space-3);
}

.mb-4 {
  margin-bottom: var(--space-4);
}

.mb-6 {
  margin-bottom: var(--space-6);
}

.mb-8 {
  margin-bottom: var(--space-8);
}

.mb-10 {
  margin-bottom: var(--space-10);
}

.mb-12 {
  margin-bottom: var(--space-12);
}

.mb-16 {
  margin-bottom: var(--space-16);
}

.mt-1 {
  margin-top: var(--space-1);
}

.mt-2 {
  margin-top: var(--space-2);
}

.mt-3 {
  margin-top: var(--space-3);
}

.mt-4 {
  margin-top: var(--space-4);
}

.mt-6 {
  margin-top: var(--space-6);
}

.mt-8 {
  margin-top: var(--space-8);
}

.mr-2 {
  margin-right: var(--space-2);
}

.mr-3 {
  margin-right: var(--space-3);
}

.ml-2 {
  margin-left: var(--space-2);
}

.ml-auto {
  margin-left: auto;
}

.p-0 {
  padding: 0;
}

.p-2 {
  padding: var(--space-2);
}

.p-3 {
  padding: var(--space-3);
}

.p-4 {
  padding: var(--space-4);
}

.p-5 {
  padding: var(--space-5);
}

.p-6 {
  padding: var(--space-6);
}

.p-8 {
  padding: var(--space-8);
}

.px-2 {
  padding-left: var(--space-2);
  padding-right: var(--space-2);
}

.px-3 {
  padding-left: var(--space-3);
  padding-right: var(--space-3);
}

.px-4 {
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

.px-6 {
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

.px-8 {
  padding-left: var(--space-8);
  padding-right: var(--space-8);
}

.py-2 {
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}

.py-3 {
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}

.py-4 {
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}

.py-6 {
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
}

.py-8 {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}

.py-12 {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

.py-16 {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

.py-20 {
  padding-top: var(--space-20);
  padding-bottom: var(--space-20);
}

.py-24 {
  padding-top: var(--space-24);
  padding-bottom: var(--space-24);
}

/* Width/Height Utilities */
.w-full {
  width: 100%;
}

.w-auto {
  width: auto;
}

.h-full {
  height: 100%;
}

.min-h-screen {
  min-height: 100vh;
}

.max-w-full {
  max-width: 100%;
}

.overflow-hidden {
  overflow: hidden;
}

.overflow-auto {
  overflow: auto;
}

/* Position Utilities */
.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.fixed {
  position: fixed;
}

.sticky {
  position: sticky;
}

.inset-0 {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.top-0 {
  top: 0;
}

.left-0 {
  left: 0;
}

.right-0 {
  right: 0;
}

/* Display Utilities */
.block {
  display: block;
}

.inline-block {
  display: inline-block;
}

.hidden {
  display: none;
}

/* === HEADER / NAVIGATION === */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  z-index: var(--z-fixed);
  display: flex;
  align-items: center;
  padding: 0 var(--space-6);
  transition:
    background-color var(--transition-base),
    box-shadow var(--transition-base);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.site-header nav {
  margin-left: auto !important;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container-wide);
  margin: 0 auto;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-heading);
  font-weight: var(--font-bold);
  font-size: var(--text-xl);
  color: var(--color-text);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.header-logo:hover {
  opacity: 0.85;
}

.header-logo img {
  height: 36px;
  width: auto;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.header-nav-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-text);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast);
}

.header-nav-link:hover {
  background-color: var(--color-surface);
  color: var(--color-primary);
}

.header-nav-link.active {
  background-color: var(--color-primary-lightest);
  color: var(--color-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Search Bar in Header */
.header-search {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: #64748b;
  cursor: pointer;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
  min-width: 200px;
}

.header-search:hover {
  border-color: var(--color-primary-light);
}

.header-search:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.header-search kbd {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  padding: 2px 6px;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  margin-left: auto;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  color: var(--color-text);
  transition: background-color var(--transition-fast);
}

.mobile-menu-toggle:hover {
  background-color: var(--color-surface);
}

/* === SIDEBAR NAVIGATION === */
.sidebar-section {
  margin-bottom: var(--space-6);
}

.sidebar-section-title {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-1);
}

.sidebar-nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--font-normal);
  color: var(--color-text);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  margin-bottom: 1px;
}

.sidebar-nav-link:hover {
  background-color: rgba(37, 99, 235, 0.06);
  color: var(--color-primary);
}

.sidebar-nav-link.active {
  background-color: var(--color-primary-lightest);
  color: var(--color-primary);
  font-weight: var(--font-medium);
}

.sidebar-nav-link .sidebar-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

.sidebar-nav-link.active .sidebar-icon {
  opacity: 1;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  font-family: var(--font-primary);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  line-height: 1.5;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}

.btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Primary Button */
.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-primary:active {
  background-color: var(--color-primary-darker);
  transform: translateY(0);
  box-shadow: none;
}

/* Secondary Button */
.btn-secondary {
  background-color: var(--color-surface);
  color: var(--color-primary);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  background-color: var(--color-primary-lightest);
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:active {
  background-color: var(--color-border);
}

/* Outline Button */
.btn-outline {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:hover {
  background-color: var(--color-primary);
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

/* Ghost Button */
.btn-ghost {
  background-color: transparent;
  color: var(--color-text);
  border-color: transparent;
}

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

/* Danger Button */
.btn-danger {
  background-color: var(--color-error);
  color: #ffffff;
  border-color: var(--color-error);
}

.btn-danger:hover {
  background-color: #dc2626;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* Success Button */
.btn-success {
  background-color: var(--color-success);
  color: #ffffff;
  border-color: var(--color-success);
}

.btn-success:hover {
  background-color: #16a34a;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* Button Sizes */
.btn-xs {
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs);
  border-radius: var(--radius-sm);
}

.btn-sm {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-sm);
}

.btn-lg {
  padding: var(--space-3) var(--space-8);
  font-size: var(--text-base);
}

.btn-xl {
  padding: var(--space-4) var(--space-10);
  font-size: var(--text-lg);
  border-radius: var(--radius-lg);
}

.btn-icon {
  padding: var(--space-2);
  width: 40px;
  height: 40px;
}

.btn-icon.btn-sm {
  width: 32px;
  height: 32px;
  padding: var(--space-1);
}

/* === CARDS === */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-card-hover);
}

.card-interactive {
  cursor: pointer;
}

.card-interactive:hover {
  border-color: var(--color-primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.card-elevated {
  background: var(--color-background);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.card-elevated:hover {
  box-shadow: var(--shadow-xl);
}

.card-featured {
  background: linear-gradient(135deg,
      var(--color-surface) 0%,
      var(--color-primary-lightest) 100%);
  border-color: var(--color-primary-light);
}

.card-header {
  margin-bottom: var(--space-4);
}

.card-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.card-description {
  font-size: var(--text-sm);
  color: #64748b;
  line-height: var(--leading-relaxed);
}

.card-footer {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

/* Feature Card (for landing page & docs) */
.feature-card {
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  text-align: left;
  transition: all var(--transition-base);
}

.feature-card:hover {
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.feature-card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-lightest);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  color: var(--color-primary);
}

.feature-card-icon svg {
  width: 24px;
  height: 24px;
}

/* Nav Card (Quick Navigation) */
.nav-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all var(--transition-base);
}

.nav-card:hover {
  border-color: var(--color-primary);
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.nav-card-arrow {
  margin-left: auto;
  color: var(--color-primary);
  opacity: 0;
  transform: translateX(-8px);
  transition: all var(--transition-base);
}

.nav-card:hover .nav-card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* === FORM ELEMENTS === */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.form-label-required::after {
  content: " *";
  color: var(--color-error);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-family: var(--font-primary);
  color: var(--color-text);
  background-color: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
  outline: none;
}

.form-input:hover,
.form-textarea:hover,
.form-select:hover {
  border-color: var(--color-primary-light);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #94a3b8;
}

.form-input.error,
.form-textarea.error {
  border-color: var(--color-error);
}

.form-input.error:focus,
.form-textarea.error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

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

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

.form-hint {
  font-size: var(--text-xs);
  color: #64748b;
  margin-top: var(--space-1);
}

.form-error {
  font-size: var(--text-xs);
  color: var(--color-error);
  margin-top: var(--space-1);
}

.form-checkbox-group {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.form-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

/* === BADGES & TAGS === */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge-primary {
  background-color: var(--color-primary-lightest);
  color: var(--color-primary);
}

.badge-secondary {
  background-color: var(--color-surface);
  color: var(--color-text-secondary);
}

.badge-success {
  background-color: #dcfce7;
  color: #16a34a;
}

.badge-warning {
  background-color: #fef3c7;
  color: #d97706;
}

.badge-error {
  background-color: #fef2f2;
  color: #dc2626;
}

.badge-accent {
  background-color: var(--color-accent);
  color: #ffffff;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text-secondary);
  background: var(--color-background);
  cursor: default;
  transition: all var(--transition-fast);
}

.tag-clickable {
  cursor: pointer;
}

.tag-clickable:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-lightest);
}

/* === CODE BLOCKS === */
.code-block {
  background: var(--color-code-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: var(--space-6) 0;
  border: 1px solid #334155;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: #0f172a;
  border-bottom: 1px solid #334155;
}

.code-block-lang {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.code-block-copy {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs);
  color: #94a3b8;
  background: transparent;
  border: 1px solid #475569;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.code-block-copy:hover {
  color: #ffffff;
  border-color: #64748b;
  background: #334155;
}

.code-block pre {
  padding: var(--space-4);
  overflow-x: auto;
  margin: 0;
}

.code-block code {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-code-text);
}

code:not([class]) {
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: 2px 6px;
  /* background: var(--color-primary-lightest); */
  color: var(--color-primary-dark);
  border-radius: var(--radius-sm);
  /* border: 1px solid var(--color-border); */
}

/* === DOCUMENTATION CONTENT STYLES === */
.doc-content h1 {
  font-size: var(--text-4xl);
  margin-top: 0;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.doc-content h2 {
  font-size: var(--text-2xl);
  margin-top: var(--space-12);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.doc-content h3 {
  font-size: var(--text-xl);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

.doc-content h4 {
  font-size: var(--text-lg);
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
}

.doc-content p {
  margin-bottom: var(--space-4);
  line-height: var(--leading-relaxed);
  color: #334155;
}

.doc-content a {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-color: var(--color-border);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--transition-fast);
}

.doc-content a:hover {
  text-decoration-color: var(--color-primary);
}

.doc-content ul,
.doc-content ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
}

.doc-content ul {
  list-style: disc;
}

.doc-content ol {
  list-style: decimal;
}

.doc-content li {
  margin-bottom: var(--space-2);
  line-height: var(--leading-relaxed);
  color: #334155;
}

.doc-content li ul,
.doc-content li ol {
  margin-top: var(--space-2);
  margin-bottom: 0;
}

.doc-content blockquote {
  margin: var(--space-6) 0;
  padding: var(--space-4) var(--space-5);
  border-left: 4px solid var(--color-primary);
  background: var(--color-surface);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.doc-content blockquote p:last-child {
  margin-bottom: 0;
}

.doc-content img {
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  margin: var(--space-6) 0;
}

.doc-content table {
  width: 100%;
  margin: var(--space-6) 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.doc-content table th {
  background: var(--color-surface);
  font-weight: var(--font-semibold);
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 2px solid var(--color-border);
  font-size: var(--text-sm);
}

.doc-content table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
}

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

.doc-content table tr:hover td {
  background: var(--color-surface-alt);
}

/* === CALLOUT / ALERT BOXES === */
.callout {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  margin: var(--space-6) 0;
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.callout-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
}

.callout-content p:last-child {
  margin-bottom: 0;
}

.callout-info {
  background: var(--color-primary-lightest);
  border: 1px solid var(--color-border);
  color: var(--color-primary-darker);
}

.callout-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.callout-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.callout-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.callout-tip {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

/* === BREADCRUMB === */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-1);
  font-size: var(--text-sm);
  color: #64748b;
  margin-bottom: var(--space-6);
}

.breadcrumb-link {
  color: #64748b;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumb-link:hover {
  color: var(--color-primary);
}

.breadcrumb-separator {
  color: var(--color-border);
  margin: 0 var(--space-1);
}

.breadcrumb-current {
  color: var(--color-text);
  font-weight: var(--font-medium);
}

/* === PAGINATION === */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  margin-top: var(--space-8);
}

.pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.pagination-link:hover {
  background: var(--color-surface);
  border-color: var(--color-primary-light);
  color: var(--color-primary);
}

.pagination-link.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
}

/* Doc Pagination (Prev/Next) */
.doc-pagination {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
}

.doc-pagination-link {
  display: flex;
  flex-direction: column;
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all var(--transition-base);
}

.doc-pagination-link:hover {
  border-color: var(--color-primary);
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
}

.doc-pagination-link--next {
  text-align: right;
  grid-column: 2;
}

.doc-pagination-label {
  font-size: var(--text-xs);
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-1);
}

.doc-pagination-title {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--color-primary);
}

/* === TABLE OF CONTENTS (TOC) === */
.toc {
  position: sticky;
  top: calc(var(--header-height) + var(--space-8));
  max-height: calc(100vh - var(--header-height) - var(--space-16));
  overflow-y: auto;
  padding-left: var(--space-4);
  border-left: 1px solid var(--color-border);
}

.toc-title {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: var(--space-3);
}

.toc-link {
  display: block;
  padding: var(--space-1) 0;
  font-size: var(--text-sm);
  color: #64748b;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.toc-link:hover {
  color: var(--color-primary);
}

.toc-link.active {
  color: var(--color-primary);
  font-weight: var(--font-medium);
}

.toc-link--nested {
  padding-left: var(--space-3);
  font-size: var(--text-xs);
}

/* === TABS === */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: var(--space-6);
  overflow-x: auto;
}

.tab {
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: #64748b;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.tab:hover {
  color: var(--color-primary);
}

.tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* === STEPS / STEPPER === */
.steps {
  counter-reset: step-counter;
  padding-left: 0;
  list-style: none;
}

.step {
  position: relative;
  padding-left: var(--space-12);
  padding-bottom: var(--space-8);
  counter-increment: step-counter;
}

.step:last-child {
  padding-bottom: 0;
}

.step::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #ffffff;
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  border-radius: var(--radius-full);
}

.step::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 36px;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}

.step:last-child::after {
  display: none;
}

.step-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-2);
}

.step-content {
  color: #334155;
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

/* === SEARCH === */
.search-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-overlay);
  z-index: var(--z-modal);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.search-overlay.open {
  opacity: 1;
  visibility: visible;
}

.search-dialog {
  width: 100%;
  max-width: 640px;
  background: var(--color-background);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  overflow: hidden;
  transform: translateY(-20px) scale(0.95);
  transition: transform var(--transition-spring);
}

.search-overlay.open .search-dialog {
  transform: translateY(0) scale(1);
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border);
}

.search-input-wrapper input {
  flex: 1;
  border: none;
  outline: none;
  font-size: var(--text-lg);
  background: transparent;
}

.search-results-list {
  max-height: 400px;
  overflow-y: auto;
  padding: var(--space-2);
}

.search-result-item {
  display: block;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background-color var(--transition-fast);
}

.search-result-item:hover {
  background: var(--color-surface);
}

.search-result-title {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.search-result-excerpt {
  font-size: var(--text-xs);
  color: #64748b;
}

.search-result-breadcrumb {
  font-size: var(--text-xs);
  color: var(--color-primary);
  margin-bottom: var(--space-1);
}

/* === FOOTER === */
footer {
  background: #0f172a !important;
}

.site-footer {
  background: var(--color-text);
  color: #bfdbfe;
  padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-10);
  margin-bottom: var(--space-12);
}

.footer-brand {
  max-width: 300px;
}

.footer-brand-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.footer-brand-logo img {
  height: 32px;
  width: auto;
  filter: brightness(0) invert(1);
}

.footer-brand-name {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: #ffffff;
}

.footer-brand p {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: #93bbfd;
}

.footer-section-title {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff;
  margin-bottom: var(--space-4);
}

.footer-link {
  display: block;
  font-size: var(--text-sm);
  color: #93bbfd;
  text-decoration: none;
  padding: var(--space-1) 0;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: #ffffff;
}

.footer-bottom {
  padding-top: var(--space-8);
  border-top: 1px solid rgba(191, 219, 254, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-sm);
  color: #93bbfd;
}

.footer-bottom-links {
  display: flex;
  gap: var(--space-6);
}

.footer-bottom-links a {
  color: #93bbfd;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-bottom-links a:hover {
  color: #ffffff;
}

/* === HERO SECTION === */
.hero {
  position: relative;
  padding: var(--space-24) 0;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(160deg,
      #ffffff 0%,
      var(--color-surface) 30%,
      var(--color-primary-lightest) 70%,
      #ffffff 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 30% 20%,
      rgba(37, 99, 235, 0.06) 0%,
      transparent 50%),
    radial-gradient(circle at 70% 80%,
      rgba(96, 165, 250, 0.08) 0%,
      transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-4);
  background: var(--color-primary-lightest);
  color: var(--color-primary);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-6);
  border: 1px solid var(--color-border);
}

.hero h1 {
  font-size: var(--text-5xl);
  font-weight: var(--font-extrabold);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-6);
  background: linear-gradient(135deg,
      var(--color-primary-darker) 0%,
      var(--color-primary) 50%,
      var(--color-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: var(--text-xl);
  color: #475569;
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-8);
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.hero-image {
  margin-top: var(--space-16);
  position: relative;
}

.hero-image img {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  border: 1px solid var(--color-border);
}

/* === QR CODE ANIMATIONS === */
@keyframes qr-scan-line {
  0% {
    top: 0%;
  }

  100% {
    top: 100%;
  }
}

@keyframes qr-pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
}

@keyframes qr-success {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

@keyframes slide-in-right {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

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

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

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

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

@keyframes nfc-wave {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }

  100% {
    transform: scale(2);
    opacity: 0;
  }
}

@keyframes payment-success {
  0% {
    stroke-dashoffset: 100;
  }

  100% {
    stroke-dashoffset: 0;
  }
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-slide-up {
  animation: slide-up 0.5s ease-out;
}

.animate-slide-in-right {
  animation: slide-in-right 0.5s ease-out;
}

.animate-fade-in {
  animation: fade-in 0.3s ease-out;
}

.animate-spin {
  animation: spin 1s linear infinite;
}

.animate-pulse {
  animation: qr-pulse 2s ease-in-out infinite;
}

/* QR Scanner Visual */
.qr-scanner-visual {
  position: relative;
  width: 200px;
  height: 200px;
  border: 3px solid var(--color-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 0 auto;
}

.qr-scanner-visual::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
      transparent,
      var(--color-primary),
      transparent);
  animation: qr-scan-line 2s ease-in-out infinite alternate;
  z-index: 1;
}

.qr-scanner-corners {
  position: absolute;
  inset: -3px;
}

.qr-scanner-corners::before,
.qr-scanner-corners::after {
  content: "";
  position: absolute;
  width: 30px;
  height: 30px;
  border-color: var(--color-primary);
  border-style: solid;
}

.qr-scanner-corners::before {
  top: 0;
  left: 0;
  border-width: 4px 0 0 4px;
  border-radius: var(--radius-sm) 0 0 0;
}

.qr-scanner-corners::after {
  top: 0;
  right: 0;
  border-width: 4px 4px 0 0;
  border-radius: 0 var(--radius-sm) 0 0;
}

/* NFC Wave Visual */
.nfc-wave-container {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nfc-wave {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--color-primary);
  animation: nfc-wave 1.5s ease-out infinite;
}

.nfc-wave:nth-child(2) {
  animation-delay: 0.3s;
}

.nfc-wave:nth-child(3) {
  animation-delay: 0.6s;
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg,
      var(--color-surface) 25%,
      var(--color-primary-lightest) 50%,
      var(--color-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

.skeleton-text {
  height: 16px;
  margin-bottom: var(--space-2);
}

.skeleton-text:last-child {
  width: 70%;
}

.skeleton-heading {
  height: 28px;
  width: 60%;
  margin-bottom: var(--space-4);
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
}

/* Loading Spinner */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.spinner-lg {
  width: 40px;
  height: 40px;
  border-width: 4px;
}

/* === TOAST / NOTIFICATION === */
.toast-container {
  position: fixed;
  top: calc(var(--header-height) + var(--space-4));
  right: var(--space-4);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 320px;
  animation: slide-in-right 0.3s ease-out;
}

.toast-success {
  border-left: 4px solid var(--color-success);
}

.toast-error {
  border-left: 4px solid var(--color-error);
}

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

.toast-info {
  border-left: 4px solid var(--color-primary);
}

/* === MODAL === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-overlay);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--color-background);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform var(--transition-spring);
}

.modal-overlay.open .modal {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--color-border);
}

.modal-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
}

.modal-body {
  padding: var(--space-6);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--color-border);
}

/* === ADMIN SPECIFIC === */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 260px;
  background: var(--color-text);
  color: #ffffff;
  padding: var(--space-6) 0;
  flex-shrink: 0;
}

.admin-sidebar-logo {
  padding: 0 var(--space-6);
  margin-bottom: var(--space-8);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.admin-sidebar-logo img {
  height: 32px;
  filter: brightness(0) invert(1);
}

.admin-sidebar-logo span {
  font-family: var(--font-heading);
  font-weight: var(--font-bold);
  font-size: var(--text-lg);
}

.admin-sidebar-nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  color: #93bbfd;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.admin-sidebar-nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.admin-sidebar-nav-link.active {
  background: rgba(37, 99, 235, 0.3);
  color: #ffffff;
  border-right: 3px solid var(--color-accent);
}

.admin-main {
  flex: 1;
  background: var(--color-surface-alt);
  padding: var(--space-8);
  overflow-y: auto;
}

.admin-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-8);
}

.admin-page-title {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
}

.admin-stat-card {
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
}

.admin-stat-value {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: var(--color-text);
}

.admin-stat-label {
  font-size: var(--text-sm);
  color: #64748b;
  margin-top: var(--space-1);
}

.admin-table {
  width: 100%;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.admin-table th {
  background: var(--color-surface);
  font-weight: var(--font-semibold);
  text-align: left;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: #64748b;
  border-bottom: 1px solid var(--color-border);
}

.admin-table td {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  border-bottom: 1px solid var(--color-border);
}

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

.admin-table tr:hover td {
  background: var(--color-surface-alt);
}

/* === BLOG === */
.blog-card {
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.blog-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--color-primary-light);
}

.blog-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.blog-card-body {
  padding: var(--space-5);
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: #64748b;
  margin-bottom: var(--space-3);
}

.blog-card-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-2);
  line-height: var(--leading-snug);
}

.blog-card-excerpt {
  font-size: var(--text-sm);
  color: #475569;
  line-height: var(--leading-relaxed);
}

.blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

/* Blog Post Content */
.blog-post-header {
  text-align: center;
  padding: var(--space-12) 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-8);
}

.blog-post-title {
  font-size: var(--text-4xl);
  font-weight: var(--font-extrabold);
  margin-bottom: var(--space-4);
}

.blog-post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: #64748b;
}

.blog-post-meta-dot {
  width: 4px;
  height: 4px;
  background: #cbd5e1;
  border-radius: 50%;
}

/* Comment Section */
.comment {
  padding: var(--space-5);
  /* border: 1px solid var(--color-border); */
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
}

.comment-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--color-primary-lightest);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-weight: var(--font-bold);
  font-size: var(--text-sm);
}

.comment-author {
  font-weight: var(--font-semibold);
  font-size: var(--text-sm);
}

.comment-date {
  font-size: var(--text-xs);
  color: #64748b;
}

.comment-body {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: #334155;
}

/* Rating Stars */
.rating {
  display: inline-flex;
  gap: 2px;
}

.rating-star {
  width: 20px;
  height: 20px;
  cursor: pointer;
  color: var(--color-border);
  transition: color var(--transition-fast);
}

.rating-star.active,
.rating-star.hovered {
  color: var(--color-warning);
}

/* === CHANGELOG === */
.changelog-entry {
  position: relative;
  padding-left: var(--space-8);
  padding-bottom: var(--space-10);
  border-left: 2px solid var(--color-border);
  margin-left: var(--space-4);
}

.changelog-entry:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.changelog-entry::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  background: var(--color-primary);
  border-radius: 50%;
  border: 3px solid var(--color-background);
  box-shadow: 0 0 0 2px var(--color-primary);
}

.changelog-version {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  color: var(--color-primary);
  margin-bottom: var(--space-1);
}

.changelog-date {
  font-size: var(--text-sm);
  color: #64748b;
  margin-bottom: var(--space-4);
}

.changelog-tag {
  display: inline-flex;
  padding: 2px 8px;
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  border-radius: var(--radius-full);
}

.changelog-tag-added {
  background: #dcfce7;
  color: #166534;
}

.changelog-tag-changed {
  background: var(--color-primary-lightest);
  color: var(--color-primary);
}

.changelog-tag-fixed {
  background: #fef3c7;
  color: #92400e;
}

.changelog-tag-removed {
  background: #fef2f2;
  color: #dc2626;
}

.changelog-tag-security {
  background: #fce7f3;
  color: #9d174d;
}

/* === FEEDBACK FORM === */
.feedback-type-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.feedback-type-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.feedback-type-option:hover {
  border-color: var(--color-primary-light);
  background: var(--color-surface);
}

.feedback-type-option.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-lightest);
}

.feedback-type-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.feedback-type-option.selected .feedback-type-icon {
  background: var(--color-primary);
  color: #ffffff;
}

.feedback-type-label {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
}

/* === SCROLL TO TOP === */
.scroll-to-top {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #ffffff;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-base);
  z-index: var(--z-fixed);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

/* === SECTION DIVIDERS === */
.section {
  padding: var(--space-16) 0;
}

.section-alt {
  background: var(--color-surface);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-12);
}

.section-header h2 {
  margin-bottom: var(--space-4);
}

.section-header p {
  font-size: var(--text-lg);
  color: #475569;
  line-height: var(--leading-relaxed);
}

/* === 404 PAGE === */
.not-found {
  text-align: center;
  padding: var(--space-24) var(--space-6);
}

.not-found-code {
  font-size: 8rem;
  font-weight: var(--font-extrabold);
  font-family: var(--font-heading);
  background: linear-gradient(135deg,
      var(--color-primary) 0%,
      var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: var(--space-4);
}

/* === UTILITY CLASSES === */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.border-t {
  border-top: 1px solid var(--color-border);
}

.border-b {
  border-bottom: 1px solid var(--color-border);
}

.border {
  border: 1px solid var(--color-border);
}

.rounded-md {
  border-radius: var(--radius-md);
}

.rounded-lg {
  border-radius: var(--radius-lg);
}

.rounded-xl {
  border-radius: var(--radius-xl);
}

.rounded-full {
  border-radius: var(--radius-full);
}

.bg-surface {
  background: var(--color-surface);
}

.bg-white {
  background: var(--color-background);
}

.shadow-sm {
  box-shadow: var(--shadow-sm);
}

.shadow-md {
  box-shadow: var(--shadow-md);
}

.shadow-lg {
  box-shadow: var(--shadow-lg);
}

.opacity-0 {
  opacity: 0;
}

.opacity-50 {
  opacity: 0.5;
}

.opacity-75 {
  opacity: 0.75;
}

.opacity-100 {
  opacity: 1;
}

.pointer-events-none {
  pointer-events: none;
}

.cursor-pointer {
  cursor: pointer;
}

.select-none {
  user-select: none;
  -webkit-user-select: none;
}

.transition-all {
  transition: all var(--transition-base);
}

.transition-colors {
  transition:
    color var(--transition-fast),
    background-color var(--transition-fast),
    border-color var(--transition-fast);
}

/* === RESPONSIVE === */
@media (max-width: 1280px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

@media (max-width: 1024px) {
  :root {
    --sidebar-width: 240px;
  }

  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero h1 {
    font-size: var(--text-4xl);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  h1 {
    font-size: var(--text-3xl);
  }

  h2 {
    font-size: var(--text-2xl);
  }

  h3 {
    font-size: var(--text-xl);
  }

  .container {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .header-nav {
    display: none;
  }

  .header-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-background);
    padding: var(--space-4);
    z-index: var(--z-overlay);
    overflow-y: auto;
  }

  .docs-sidebar {
    transform: translateX(-100%);
    z-index: var(--z-overlay);
  }

  .docs-sidebar.open {
    transform: translateX(0);
  }

  .docs-content {
    margin-left: 0;
    max-width: 100%;
    padding: var(--space-6) var(--space-4);
  }

  .hero {
    padding: var(--space-16) 0;
  }

  .hero h1 {
    font-size: var(--text-3xl);
  }

  .hero p {
    font-size: var(--text-base);
  }

  .hero-actions {
    flex-direction: column;
  }

  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }

  .doc-pagination {
    grid-template-columns: 1fr;
  }

  .doc-pagination-link--next {
    grid-column: 1;
  }

  .section {
    padding: var(--space-10) 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }

  .feedback-type-selector {
    grid-template-columns: 1fr;
  }

  .admin-layout {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    padding: var(--space-4) 0;
  }

  .admin-main {
    padding: var(--space-4);
  }

  .not-found-code {
    font-size: 5rem;
  }

  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 480px) {
  .btn-lg {
    padding: var(--space-2) var(--space-5);
    font-size: var(--text-sm);
  }

  .header-search {
    min-width: auto;
    display: none;
  }

  .header-search-mobile {
    display: flex;
  }
}

/* === PRINT STYLES === */
@media print {

  .site-header,
  .docs-sidebar,
  .site-footer,
  .scroll-to-top,
  .header-search,
  .btn,
  .toast-container {
    display: none !important;
  }

  .docs-content {
    margin-left: 0;
    max-width: 100%;
    padding: 0;
  }

  body {
    color: #000;
    background: #fff;
  }

  .doc-content a {
    color: #000;
    text-decoration: underline;
  }

  .doc-content a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
}

/* === FOCUS VISIBLE STYLES (Accessibility) === */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

*:focus:not(:focus-visible) {
  outline: none;
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* === HIGH CONTRAST === */
@media (prefers-contrast: high) {
  :root {
    --color-border: #1e3a8a;
    --color-text: #000000;
  }

  .btn-primary {
    border: 2px solid #000000;
  }
}

/* === SCROLLBAR STYLES === */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-surface);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-light);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) var(--color-surface);
}

/* === SELECTION === */
::selection {
  background: var(--color-primary-lightest);
  color: var(--color-primary-darker);
}

.video-wrapper {
  /* max-width: 720px; */
  max-width: 100%;
  margin: 20px auto;
  padding: 12px;
  background: #f9fafb;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
}

.video-wrapper video {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  background: #000;
}

/* Modern Header and sidebar */
/* Basic reset for preview consistency */
body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  background: #ffffff;
}

/* Premium Modern Header Styles */
.modern-header {
  font-family: "Inter", sans-serif;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid #e2e8f0;
  z-index: 300;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.modern-header-inner {
  width: 100%;
  max-width: 1440px;
  /* Next.js Doc Container */
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 100%;
}

.modern-header-logo-plate {
  display: flex;
  align-items: center;
  padding-left: 32px;
  /* Standard container padding */
  flex: 0 0 auto;
  width: auto;
  min-width: 240px;
  height: 100%;
  box-sizing: border-box;
}

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

.modern-logo img {
  height: 50px;
  width: auto;
  border-radius: 6px;
}

.modern-logo span {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.04em;
}

.modern-header-content {
  display: grid;
  align-items: center;
  /* grid-template-columns: 1fr auto 1fr; */
  flex: 1;
  gap: 40px;
  /* padding: 0 24px 0 40px; */
  height: 100%;
  min-width: 0;
}

.modern-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
  grid-column: 2;
  justify-self: center;
  margin: 0 auto;
}

.modern-nav-group {
  position: relative;
  height: 100%;
}

.modern-nav-group-trigger {
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s ease;
  position: relative;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
}

.modern-nav-group-trigger:hover,
.modern-nav-group.open .modern-nav-group-trigger {
  color: #0f172a;
}

.modern-nav-group-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
  display: none;
  z-index: 1100;
}

.modern-nav-group.open .modern-nav-group-menu {
  display: grid;
  gap: 4px;
}

.modern-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  /* Lighter color for non-active */
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
  padding: 0;
  display: flex;
  align-items: center;
  height: 100%;
}

.modern-nav a:hover {
  color: #0f172a;
}

.modern-nav-group-menu a {
  font-size: 14px;
  height: auto;
  border-radius: 8px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.modern-nav-group-menu a:hover,
.modern-nav-group-menu a.active {
  background: #f1f5f9;
}

.modern-nav-group.active .modern-nav-group-trigger {
  color: #0f172a;
  font-weight: 600;
}

.modern-nav-group-menu a.active::after {
  display: none;
}

.modern-nav-coming-item {
  cursor: not-allowed;
  opacity: 0.9;
}

.modern-nav-coming-badge {
  font-size: 8px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 4px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fde68a;
  white-space: nowrap;
}

.modern-nav a.active {
  color: #0f172a;
  font-weight: 600;
}

.modern-nav a.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #0f172a;
  border-radius: 2px 2px 0 0;
  z-index: 2;
}

.modern-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.modern-header-tools {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
}

.modern-search-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 240px;
  padding: 6px 12px;
  background-color: #f1f5f9;
  border: 1px solid transparent;
  border-radius: 8px;
  font-family: "Inter", sans-serif;
  font-size: 0.875rem;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  margin: 0 20px 0 0;
}

.modern-search-btn:hover {
  background-color: #fff;
  border-color: #cbd5e1;
  color: #334155;
}

.modern-search-btn .search-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modern-search-btn .search-icon {
  color: #94a3b8;
  font-size: 0.85rem;
}

.modern-search-shortcuts {
  display: flex;
  align-items: center;
  gap: 4px;
}

.modern-search-shortcuts kbd {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 2px 6px;
  background-color: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  color: #64748b;
}

.modern-cta-btn {
  padding: 8px 16px;
  background: #3b82f6 !important;
  color: #ffffff;
  border: 1px solid #3b82f6 !important;
  border-radius: 8px;
  font-family: "Inter", sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modern-cta-btn:hover {
  background: #1e293b;
}

/* Mobile Menu Toggle */
.modern-mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 1.25rem;
  color: #0f172a;
  cursor: pointer;
  margin-left: 16px;
  border-radius: 8px;
  transition: background-color 0.2s;
  position: relative;
  z-index: 1100;
  /* Higher than nav drawer */
}

.modern-mobile-menu-toggle:hover {
  background-color: #f1f5f9;
}

/* Mobile Menu Overlay */
.modern-mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  /* background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px); */
  z-index: 1050;
  /* Below toggle and nav, above content */
}

.modern-mobile-menu-overlay.open {
  display: block;
}

@media (max-width: 1280px) {
  .modern-nav {
    gap: 16px;
  }

  .modern-search-btn {
    width: 200px;
  }
}

@media (max-width: 1024px) {
  .modern-header {
    height: 72px;
    /* A bit taller for mobile for more space */
  }

  .modern-header-inner {
    gap: 12px;
  }

  .modern-mobile-menu-toggle {
    display: flex;
  }

  .modern-header-logo-plate {
    padding-left: 16px;
  }

  .modern-header-content {
    padding: 0 16px;
    display: flex;
    justify-content: flex-end;
  }

  .modern-nav {
    position: fixed;
    top: 72px;
    left: 0;
    width: 280px;
    height: calc(100vh - 72px);
    background: #ffffff;
    flex-direction: column;
    align-items: flex-start;
    padding: 32px;
    gap: 0;
    box-shadow: 1px 0 0 #e2e8f0;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1090;
    /* High but below toggle */
  }

  .modern-nav-group {
    width: 100%;
    height: auto;
  }

  .modern-nav-group-trigger {
    width: 100%;
    height: 48px;
    font-size: 1rem;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
    justify-content: space-between;
  }

  .modern-nav-group-menu {
    position: static;
    display: none;
    min-width: 0;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0 0 8px 12px;
    background: transparent;
  }

  .modern-nav-group.open .modern-nav-group-menu {
    display: grid;
    gap: 2px;
  }

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

  .modern-nav a {
    width: 100%;
    height: 48px;
    font-size: 0.95rem;
    color: #334155;
    border-bottom: none;
    padding: 0 8px 0 10px;
  }

  .modern-nav a.active::after {
    display: none;
  }

  .modern-nav a.active {
    color: #3b82f6;
    font-weight: 600;
  }
}

@media (max-width: 768px) {
  .modern-search-btn {
    width: 40px;
    justify-content: center;
    padding: 0;
  }

  .modern-search-btn .search-content span,
  .modern-search-shortcuts {
    display: none;
  }

  .modern-cta-btn {
    display: none;
  }
}

@media (max-width: 480px) {
  .modern-logo span {
    display: none;
  }
}

/* Modern Layout Overrides - Containerized */
.consumer-getting-started {
  max-width: 1440px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding-top: 64px !important;
  display: flex !important;
}

@media (max-width: 1024px) {
  .consumer-getting-started {
    padding-top: 72px !important;
  }
}

.cgs-sidebar {
  box-sizing: border-box !important;
  width: 280px !important;
  min-width: 280px !important;
  background: #ffffff !important;
  /* Minimal white */
  border-right: 1px solid #e2e8f0 !important;

  padding-left: 32px !important;
  padding-right: 24px !important;
  padding-top: 40px !important;
  position: sticky !important;
  top: 64px !important;
  height: calc(100vh - 64px) !important;
  overflow-y: auto !important;
}

.cgs-sidebar-header {
  padding: 0 !important;
  border-bottom: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  position: relative !important;
}

.cgs-sidebar-close {
  display: none;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #64748b;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.cgs-sidebar-close:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

@media (max-width: 1024px) {
  .cgs-sidebar-close {
    display: flex;
  }
}

.cgs-sidebar-header h3 i {
  color: #0f172a !important;
  font-size: 1.1rem !important;
}

.cgs-nav-section {
  margin-bottom: 32px !important;
  padding: 0 !important;
}

.cgs-nav-section-label {
  font-family: "Inter", sans-serif !important;
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  color: #0f172a !important;
  /* Darker heading for sections */
  text-transform: none !important;
  /* Minimalist capitalisation */
  letter-spacing: normal !important;
  padding: 0 0 12px 0 !important;
  display: block !important;
  margin: 0 !important;
  margin-top: 8px !important;
}

.cgs-nav-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0 4px !important;
  /* Slight inset */
  border-left: 1px solid #e2e8f0 !important;
  /* The vertical line */
}

.cgs-nav-list li {
  padding: 0 !important;
  margin: 0 !important;
}

.cgs-nav-list li a {
  padding: 6px 16px !important;
  font-family: "Inter", sans-serif !important;
  font-size: 0.875rem !important;
  color: #64748b !important;
  /* Light slate text */
  border-radius: 0 !important;
  /* NO RADIUS */
  background: transparent !important;
  transition: all 0.2s ease !important;
  font-weight: 400 !important;
  /* Thin natural font weight */
  display: flex !important;
  align-items: center !important;
  /* Icon center align! */
  line-height: 1.5 !important;
  gap: 12px !important;
  text-decoration: none !important;
  border-left: 1px solid transparent !important;
  /* Invisible active border anchor */
  margin-left: -1px !important;
  /* Overlap parent ul border */
  cursor: pointer;
}

.cgs-nav-list li a i {
  font-size: 0.875rem !important;
  color: #94a3b8 !important;
  /* Light gray icons */
  transition: color 0.2s ease !important;
  margin: 0 !important;
  /* Centered with flex */
}

.cgs-nav-list li a:hover {
  color: #0f172a !important;
  border-left-color: #94a3b8 !important;
  /* Subtle hover border line */
}

.cgs-nav-list li a:hover i {
  color: #64748b !important;
}

.cgs-nav-list li a.active {
  color: #3b82f6 !important;
  /* Blue text */
  font-weight: 500 !important;
  /* Semi-bold for active */
  border-left-color: #3b82f6 !important;
  /* SOLID thin blue active border line! */
  background: transparent !important;
  /* Minimal: no bg highlight */
}

.cgs-nav-list li a.active i {
  color: #3b82f6 !important;
}

.cgs-main {
  flex: 1;
  display: flex;
  min-width: 0 !important;
  /* Fix flex overflow */
  background: #ffffff !important;
}

.cgs-content-area {
  flex: 1;
  max-width: 860px !important;
  margin: 0;
  padding: 40px 64px !important;
  min-width: 0 !important;
}

/* Minimal TOC Override */
.cgs-toc {
  width: 260px !important;
  min-width: 260px !important;
  padding: 40px 32px 32px 0 !important;
  position: sticky !important;
  top: 64px !important;
  align-self: flex-start !important;
  max-height: calc(100vh - 64px) !important;
  overflow-y: auto !important;
  border-left: none !important;
  /* Clean without arbitrary borders */
}

.cgs-toc ul li {
  display: flex;
}

.cgs-toc-title {
  font-family: "Inter", sans-serif !important;
  font-size: 0.875rem !important;
  color: #0f172a !important;
  margin: 0 0 16px 0 !important;
  text-transform: none !important;
  /* Clean mixed case */
  letter-spacing: normal !important;
  padding: 0 !important;
}

.cgs-toc-list {
  border-left: 1px solid #e2e8f0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

.cgs-toc-link {
  font-family: "Inter", sans-serif !important;
  font-size: 0.8125rem !important;
  color: #64748b;
  padding: 6px 0 6px 16px !important;
  border-left: 1px solid transparent !important;
  margin-left: -1px !important;
  font-weight: 400 !important;
  transition: all 0.15s ease !important;
}

.cgs-toc-link:hover {
  color: #0f172a ;
  border-left-color: #94a3b8 !important;
}

.cgs-toc-link.active {
  color: #3b82f6 !important;
  border-left-color: #3b82f6 !important;
  font-weight: 500 !important;
}

/* Responsive YouTube iframe Wrapper */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  /* Premium shadow */
  margin: 32px 0;
  background: #0f172a;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- Comprehensive Mobile Responsiveness --- */
@media (max-width: 1200px) {
  .cgs-toc {
    display: none !important;
  }

  .cgs-content-area {
    max-width: 100% !important;
  }
}

@media (max-width: 1024px) {

  /* Header shrinks */
  .modern-header-logo-plate {
    width: auto !important;
    min-width: 0 !important;
    padding-left: 24px !important;
    border-right: none !important;
  }

  .modern-search-btn {
    width: 180px !important;
  }

  /* Layout reflows */
  .cgs-sidebar {
    width: 240px !important;
    min-width: 240px !important;
    padding-left: 24px !important;
    border-right: 1px solid #e2e8f0 !important;
  }

  .cgs-content-area {
    padding: 40px 32px !important;
  }
}

@media (max-width: 768px) {

  /* Header: hide extra actions for space */
  .modern-header-logo-plate {
    padding-left: 16px !important;
  }

  .modern-header-content {
    padding: 0 16px !important;
    justify-content: flex-end !important;
    gap: 8px !important;
  }

  .modern-search-btn {
    display: none !important;
  }

  /* Hidden entirely */
  .modern-cta-btn {
    padding: 6px 12px !important;
    font-size: 0.8rem !important;
  }

  /* Sidebar: become a floating side-sheet */
  .cgs-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    height: 100vh !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 1200 !important;
    /* Above everything */
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15) !important;
    width: 280px !important;
    padding-left: 24px !important;
    background: #ffffff !important;
  }

  .cgs-sidebar.open {
    transform: translateX(0) !important;
  }

  .cgs-sidebar-overlay.show {
    z-index: 1190 !important;
    /* Right beneath sidebar */
    display: block !important;
    background: rgba(15, 23, 42, 0.4) !important;
    backdrop-filter: blur(4px) !important;
  }

  /* Main Content breaks full width */
  .cgs-main {
    min-width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    display: block !important;
  }

  .cgs-content-area {
    padding: 24px 16px 80px !important;
  }

  .cgs-section-title {
    font-size: 1.5rem !important;
  }

  .cgs-page-title {
    font-size: 1.75rem !important;
  }
}

@media (max-width: 480px) {

  /* .modern-logo span { display: none !important; } Only show Logo Icon on tiny phones */
  .modern-cta-btn {
    font-size: 0.75rem !important;
    padding: 6px 10px !important;
  }
}

/* Mobile sidebar toggle */
.cgs-sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary, #2563eb);
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
  cursor: pointer;
  font-size: 1.25rem;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.cgs-sidebar-toggle:hover {
  background: var(--color-primary-dark, #1d4ed8);
  transform: translateY(-2px);
}

.cgs-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 39;
}


@media (max-width: 768px) {
  .cgs-sidebar {
    transform: translateX(-100%);
    width: 280px;
    z-index: 50;
  }

  .cgs-sidebar.open {
    transform: translateX(0);
  }

  .cgs-sidebar-overlay.show {
    display: block;
  }

  .cgs-sidebar-toggle {
    display: flex;
  }

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

  .cgs-content-area {
    padding: 20px 16px 64px;
  }

  .cgs-page-title {
    font-size: 1.75rem;
  }

  .cgs-section-title {
    font-size: 1.5rem;
  }

  .cgs-requirements {
    grid-template-columns: 1fr;
  }

  .cgs-screenshot-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cgs-pagination {
    grid-template-columns: 1fr;
  }

  .cgs-pagination-btn.next {
    align-items: flex-start;
    text-align: left;
  }

  .cgs-download-buttons {
    flex-direction: column;
  }

  .cgs-download-btn {
    justify-content: center;
  }
}

/* ── Language Switcher ────────────────────────────── */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 3px;
  margin-right: 16px;
  /* Added for spacing in the header */
}

.lang-switcher button {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 4px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: all 0.18s ease;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lang-switcher button:hover {
  color: #0f172a;
}

.lang-switcher button.active {
  background: #ffffff;
  color: #0f172a;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.10);
}

/* ── Modern Language Dropdown (Scalable) ────────────────────────────── */
.modern-lang-wrapper {
  position: relative;
  display: inline-block;
  margin-right: 16px;
}

.modern-lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 6px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modern-lang-btn:hover,
.modern-lang-btn.open {
  background: #ffffff;
  color: #0f172a;
  border-color: #cbd5e1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.modern-lang-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  flex-direction: column;
  gap: 2px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  min-width: 140px;
  z-index: 1000;
}

.modern-lang-menu.show {
  display: flex;
  animation: langFadeIn 0.2s ease;
}

@keyframes langFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

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

.modern-lang-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.modern-lang-menu button:hover {
  background: #f8fafc;
  color: #0f172a;
}

.modern-lang-menu button.active {
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 600;
}

.modern-lang-menu button .lang-code {
  font-size: 0.65rem;
  font-weight: 600;
  color: #94a3b8;
  background: #f8fafc;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

.modern-lang-menu button.active .lang-code {
  color: #3b82f6;
  border-color: #bfdbfe;
  background: #eff6ff;
}

/* ── Modern Search Button Width Fix ────────────────────────────── */
.modern-search-btn {
  width: 240px !important;
  min-width: 240px !important;
  max-width: 240px !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}

.modern-search-btn .search-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  overflow: hidden;
}

.modern-search-btn .search-content span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  max-width: 130px;
  /* Constrain the text specifically */
}

.modern-search-shortcuts {
  flex-shrink: 0;
}

/* === GLOBAL IMAGE LIGHTBOX === */
.doc-image-lightbox-open {
  overflow: hidden;
}

main img:not([data-lightbox="off"]) {
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

main img:not([data-lightbox="off"]):not(.doc-image-lightbox__image) {
  cursor: zoom-in;
}

main img:not([data-lightbox="off"]):not(.doc-image-lightbox__image):hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(30, 58, 138, 0.12);
}

.doc-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 220ms ease,
    visibility 220ms ease;
}

.doc-image-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.doc-image-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.doc-image-lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 1200px);
  max-height: calc(100vh - 48px);
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
  transform: scale(0.96);
  transition: transform 220ms ease;
}

.doc-image-lightbox.is-open .doc-image-lightbox__dialog {
  transform: scale(1);
}

.doc-image-lightbox__figure {
  margin: 0;
  display: grid;
  gap: 14px;
  justify-items: center;
}

.doc-image-lightbox__image {
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 150px);
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.3);
}

.doc-image-lightbox__caption {
  max-width: min(100%, 860px);
  text-align: center;
  color: #e2e8f0;
  font-size: 1rem;
  line-height: 1.6;
}

.doc-image-lightbox__close {
  position: absolute;
  top: -10px;
  right: -15px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.16);
  transition:
    background 180ms ease,
    transform 180ms ease;
}

.doc-image-lightbox__close:hover {
  background: rgba(30, 41, 59, 0.8);
  transform: scale(1.04);
}

@media (max-width: 768px) {
  .doc-image-lightbox {
    padding: 12px;
  }

  .doc-image-lightbox__dialog {
    width: 100%;
    max-height: calc(100vh - 24px);
    padding: 16px;
    border-radius: 18px;
  }

  .doc-image-lightbox__image {
    max-height: calc(100vh - 120px);
  }

  .doc-image-lightbox__caption {
    font-size: 0.875rem;
  }
}

@media (prefers-reduced-motion: reduce) {

  main img:not([data-lightbox="off"]),
  .doc-image-lightbox,
  .doc-image-lightbox__dialog,
  .doc-image-lightbox__close {
    transition: none;
  }
}

main.cd-main-content {
  padding-top: 20px !important;
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.modern-breadcrumb {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-6);
  padding: var(--space-2) 0;
}

.modern-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: var(--space-2);
}

.modern-breadcrumb li {
  display: flex;
  align-items: center;
  font-size: var(--text-sm);
  color: #64748b;
  /* slate-500 */
}

.modern-breadcrumb .separator {
  color: #94a3b8;
  /* slate-400 */
  font-size: 0.65rem;
  margin: 0 4px;
}

.modern-breadcrumb a,
.modern-breadcrumb .breadcrumb-item {
  color: #64748b;
  text-decoration: none;
  transition: color var(--transition-fast) ease;
  font-weight: var(--font-medium);
  display: flex;
  align-items: center;
}

.modern-breadcrumb a:hover {
  color: var(--color-primary);
}

.modern-breadcrumb .current {
  color: var(--color-text);
  /* dark slate */
  font-weight: var(--font-semibold);
}

.modern-breadcrumb .breadcrumb-icon {
  color: #94a3b8;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast) ease;
}

.modern-breadcrumb .breadcrumb-icon:hover {
  color: var(--color-primary);
  background: var(--color-surface);
}

/* === MANUAL BREADCRUMB === */
.doc-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 24px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #dbeafe;
  background: linear-gradient(180deg, #f8fbff 0%, #f1f6ff 100%);
}

.doc-breadcrumb__link {
  display: inline-flex;
  align-items: center;
  padding: 4px 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: #1d4ed8;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 150ms ease;
}

.doc-breadcrumb__link:hover {
  color: #1e3a8a;
}

.doc-breadcrumb__sep {
  color: #94a3b8;
  font-size: 0.78rem;
}

.doc-breadcrumb__current {
  font-size: 0.84rem;
  font-weight: 700;
  color: #0f172a;
}

@media (max-width: 768px) {
  .doc-breadcrumb {
    margin-bottom: 18px;
    padding: 9px 12px;
  }
}

/* ============================================
   Global Theme Toggle + Dark Theme Overrides
   ============================================ */
body,
body * {
  transition:
    background-color 0.25s ease,
    color 0.2s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

body.dark {
  --theme-bg: #141514;
  --theme-bg-elevated: #141514;
  --theme-surface: #202a3b;
  --theme-surface-soft: #273347;
  --theme-text: #e0e2e1;
  --theme-text-muted: #a0a2a1;
  --theme-border: rgb(51, 65, 85, 0.3);
  --theme-overlay: rgba(2, 6, 23, 0.75);
  --theme-shadow:
    0 12px 30px rgba(2, 6, 23, 0.42),
    0 3px 10px rgba(2, 6, 23, 0.35);
  --theme-shadow-soft:
    0 6px 16px rgba(2, 6, 23, 0.34),
    0 1px 4px rgba(2, 6, 23, 0.24);
  --theme-input-bg: #1f2a3d;
  --theme-focus: rgba(96, 165, 250, 0.42);

  color: var(--theme-text-muted);
  background-color: var(--theme-bg);
}

body.dark h1,
body.dark h2,
body.dark h3,
body.dark h4,
body.dark h5,
body.dark h6,
body.dark strong,
body.dark .text-primary {
  color: var(--theme-text);
}

body.dark .text-muted,
body.dark p,
body.dark li,
body.dark .modern-breadcrumb a,
body.dark .modern-breadcrumb .breadcrumb-item {
  color: var(--theme-text-muted);
}

body.dark .modern-header,
body.dark .lp-navbar.scrolled,
body.dark .cgs-sidebar,
body.dark .cgs-content-area,
body.dark .cd-main-content,
body.dark .md-main-content,
body.dark .tut-card,
body.dark .tut-modal-dialog,
body.dark .feedback-form-card,
body.dark .lp-search-modal-content,
body.dark .lp-search-result-item,
body.dark .lp-search-empty,
body.dark .lp-nav-dropdown-menu,
body.dark .lp-dropdown-menu,
body.dark .modern-nav-group-menu,
body.dark .modern-lang-menu,
body.dark .modern-search-btn,
body.dark .modern-lang-btn,
body.dark .tut-search-wrap,
body.dark .tut-link-btn,
body.dark .feedback-type-selector .type-card,
body.dark .feedback-info-callout,
body.dark .form-input,
body.dark .form-select,
body.dark .form-textarea,
body.dark .cgs-toc {
  background: var(--theme-bg-elevated) !important;
  color: var(--theme-text-muted) !important;
  border-color: var(--theme-border) !important;
  box-shadow: var(--theme-shadow-soft) !important;
}

body.dark .lp-navbar-links,
body.dark .lp-search-trigger,
body.dark .lp-search-input-wrap,
body.dark .lp-eyebrow,
body.dark .lp-footer,
body.dark .feature-box,
body.dark .bp-box,
body.dark .modern-search-shortcuts kbd,
body.dark .search-results-page,
body.dark #sr_search_input,
body.dark .sr-result-item,
body.dark .sr-no-results-suggestions,
body.dark .tut-meta span,
body.dark .tut-group-count,
body.dark .tut-source-link,
body.dark .lp-mobile-nav,
body.dark .upload-drop-zone,
body.dark .type-card .type-icon,
body.dark .sr-recent-tag,
body.dark .modern-nav{
  background: var(--theme-bg-elevated) !important;
}

body.dark .cgs-toc-link {
  color: var(--theme-text-muted);
}

body.dark .modern-mobile-menu-toggle ,
body.dark .lp-hamburger{
  background-color: var(--theme-bg);
  border: 1px solid var(--theme-border);
  color: white;
}

body.dark .modern-search-shortcuts kbd {
  border: none;
}

body.dark .modern-nav {
  box-shadow: none;
}

body.dark .modern-nav-group-trigger {
  border-color: var(--theme-border);
}

body.dark #sr_search_input,
body.dark .tut-meta span,
body.dark .form-label,
body.dark .type-card .type-label,
body.dark .sr-recent-tag {
  color: var(--theme-text);
}

body.dark ::placeholder {
  color: var(--theme-text-muted) !important;
}

body.dark .lp-page,
body.dark .tut-page,
body.dark .feedback-page,
body.dark .consumer-docs-layout,
body.dark .cgs-main,
body.dark .md-main,
body.dark .lp-hero-card-main,
body.dark .lp-card-kicker,
body.dark .lp-hero-card-mini,
body.dark .lp-btn-secondary,
body.dark .lp-section-tag,
body.dark .lp-card,
body.dark .lp-section-soft,
body.dark .lp-process-card,
body.dark .lp-cta-card{
  background: var(--theme-bg) !important;
}

body.dark .cgs-nav-list li a:hover,
body.dark .cd-overview-ul li strong,
body.dark .cd-overview-ol li strong {
  color: var(--theme-text) !important;
}

body.dark .cd-overview-ol li.warning strong {
  color: #b91c1c !important;
}

.cd-overview-ol li.warning strong.warning {
  color: #b91c1c !important;
}
 
body.dark .cgs-nav-list {
  border-color: #3341554d !important;
}


/* body.dark .lp-section-tag {
  color: ;
} */

body.dark .modern-nav a,
body.dark .modern-nav-group-trigger,
body.dark .lp-navbar-links a,
body.dark .lp-nav-dropdown-trigger,
body.dark .cgs-nav-link,
body.dark .feedback-breadcrumb a,
body.dark .tut-source-link,
body.dark .tut-modal-source-link {
  color: var(--theme-text-muted) !important;
}

body.dark .modern-nav a.active,
body.dark .modern-nav-group.active .modern-nav-group-trigger,
body.dark .cgs-nav-link.active,
body.dark .feedback-breadcrumb .current,
body.dark .lp-navbar-links a:hover,
body.dark .lp-nav-dropdown-trigger:hover {
  color: var(--color-primary);
}

body.dark .modern-nav-group-menu a:hover,
body.dark .modern-nav-group-menu a.active,
body.dark .lp-nav-dropdown-menu a:hover,
body.dark .lp-dropdown-item:hover,
body.dark .tut-link-btn:hover,
body.dark .type-card:hover {
  background: var(--theme-surface-soft) !important;
}

body.dark .lp-search-modal,
body.dark .tut-modal-backdrop,
body.dark .cgs-sidebar-overlay.show,
body.dark .modern-mobile-menu-overlay.open {
  background: var(--theme-overlay) !important;
}

body.dark .feedback-page-header p,
body.dark .form-hint,
body.dark .star-rating-text,
body.dark .result-desc {
  color: #9db0c7 !important;
}

body.dark .form-input::placeholder,
body.dark .form-textarea::placeholder,
body.dark input::placeholder,
body.dark textarea::placeholder {
  color: #8fa4be;
}

body.dark .form-input:focus,
body.dark .form-select:focus,
body.dark .form-textarea:focus,
body.dark input:focus,
body.dark textarea:focus,
body.dark select:focus {
  box-shadow: 0 0 0 3px var(--theme-focus) !important;
}

/* Header Theme Toggle */
.theme-toggle-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 10px 0 2px;
}

.theme-toggle {
  width: 58px;
  height: 32px;
  border: 1px solid var(--theme-border);
  border-radius: 999px;
  background: var(--theme-bg-elevated);
  box-shadow: var(--theme-shadow-soft);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.theme-toggle-track {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
}

.theme-toggle-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #f59e0b;
}

.theme-toggle-icon-sun {
  left: 10px;
}

.theme-toggle-icon-moon {
  right: 10px;
  color: #60a5fa;
}

.theme-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff, #e2e8f0);
  box-shadow: 0 3px 9px rgba(2, 6, 23, 0.22);
  transition: transform 0.24s ease;
}

body.dark .theme-toggle-thumb {
  transform: translateX(26px);
  background: linear-gradient(180deg, #cbd5e1, #94a3b8);
}

.theme-toggle:hover {
  transform: translateY(-1px);
}

.theme-toggle:focus-visible {
  outline: 2px solid #93bbfd;
  outline-offset: 2px;
}

@media (max-width: 1024px) {
  .theme-toggle-slot {
    margin-right: 8px;
  }

  .theme-toggle {
    width: 54px;
    height: 30px;
  }

  .theme-toggle-thumb {
    width: 22px;
    height: 22px;
  }

  body.dark .theme-toggle-thumb {
    transform: translateX(24px);
  }
}

.cd-overview h3,
.doc-section h3 {
  color: var(--color-text-dark);
}
