/* Cart Bell Documentation - Premium Modern UI */
/* Matching Landing Page Design System */

/* ========================================
   CSS CUSTOM PROPERTIES
   ======================================== */
:root {
    /* Primary Colors - Indigo */
    --primary-50: #eef2ff;
    --primary-100: #e0e7ff;
    --primary-200: #c7d2fe;
    --primary-300: #a5b4fc;
    --primary-400: #818cf8;
    --primary-500: #6366f1;
    --primary-600: #4f46e5;
    --primary-700: #4338ca;
    --primary-800: #3730a3;
    --primary-900: #312e81;

    /* Secondary Colors - Purple */
    --secondary-50: #faf5ff;
    --secondary-100: #f3e8ff;
    --secondary-200: #e9d5ff;
    --secondary-300: #d8b4fe;
    --secondary-400: #c084fc;
    --secondary-500: #8b5cf6;
    --secondary-600: #7c3aed;
    --secondary-700: #6d28d9;
    --secondary-800: #5b21b6;
    --secondary-900: #4c1d95;

    /* Accent - WhatsApp Green */
    --whatsapp: #25D366;
    --whatsapp-dark: #128C7E;
    --whatsapp-light: #dcf8e6;

    /* Gray Scale */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Status Colors */
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #3b82f6;
    --info-light: #dbeafe;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    --gradient-header: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    --gradient-sidebar: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-primary: 0 10px 40px -10px rgba(99, 102, 241, 0.4);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);

    /* Layout */
    --sidebar-width: 300px;
    --header-height: 70px;
    --content-max-width: 900px;
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ========================================
   RESET & BASE
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 30px);
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.7;
    color: var(--gray-700);
    background: var(--gray-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--primary-100);
    color: var(--primary-900);
}

/* Global Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-400), var(--secondary-400));
    border-radius: 4px;
    border: 2px solid var(--gray-100);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-500), var(--secondary-500));
}

::-webkit-scrollbar-corner {
    background: var(--gray-100);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-400) var(--gray-100);
}

/* ========================================
   HEADER
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--gradient-header);
    color: white;
    display: flex;
    align-items: center;
    padding: 0 32px;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.header-logo svg {
    width: 36px;
    height: 36px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.header-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-nav a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 18px;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.header-nav a:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.header-nav a.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-primary);
}

.header-nav a.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px -10px rgba(99, 102, 241, 0.5);
}

.menu-toggle {
    display: none;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    margin-right: 16px;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.menu-toggle:hover {
    background: rgba(255,255,255,0.2);
}

/* ========================================
   SIDEBAR
   ======================================== */
.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background: var(--gradient-sidebar);
    border-right: 1px solid var(--gray-200);
    overflow-y: auto;
    padding: 24px 0;
    z-index: 900;
    transition: transform var(--transition-base);
}

/* Custom Scrollbar - Sidebar */
.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
    margin: 10px 0;
}

.sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-300), var(--secondary-300));
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-400), var(--secondary-400));
}

/* Firefox scrollbar */
.sidebar {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-300) transparent;
}

/* Reset sidebar list styles */
.sidebar ul,
.sidebar li,
.sidebar-nav,
.sidebar-nav li,
.sidebar-submenu,
.sidebar-submenu li {
    list-style: none !important;
    list-style-type: none !important;
}

.sidebar li::before,
.sidebar-nav li::before,
.sidebar-submenu li::before {
    display: none !important;
    content: none !important;
}

/* Sidebar Search */
.sidebar-search {
    padding: 0 20px 24px;
    position: relative;
}

.sidebar-search input {
    width: 100%;
    padding: 14px 18px 14px 48px;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-size: 14px;
    font-family: var(--font-family);
    outline: none;
    transition: var(--transition-fast);
    background: white;
}

.sidebar-search input::placeholder {
    color: var(--gray-400);
}

/* .sidebar-search input:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px var(--primary-100);
} */

.sidebar-search::before {
    content: '';
    position: absolute;
    left: 38px;
    top: 50%;
    transform: translateY(calc(-50% - 12px));
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
}

/* Sidebar Navigation */
.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {

    margin: 0;
    list-style: none;
}

.sidebar-nav li::before {
    display: none !important;
}

.sidebar-nav > li {
    margin: 4px 20px;
    padding-left: 0;
}

.sidebar-nav > li > a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--gray-600);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    transition: var(--transition-fast);
    position: relative;
    border: none;
}

.sidebar-nav > li > a:hover {
    background: var(--gray-100);
    color: var(--primary-600);
}

.sidebar-nav > li > a.active {
    background: var(--gradient-primary);
    color: white;
    font-weight: 600;
    box-shadow: var(--shadow-primary);
}

.sidebar-nav > li > a svg {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    opacity: 0.6;
    flex-shrink: 0;
}

.sidebar-nav > li > a:hover svg {
    opacity: 1;
}

.sidebar-nav > li > a.active svg {
    opacity: 1;
    color: white;
}

.sidebar-nav > li > a button svg {
    margin-right: 0;
}

/* Submenu */
.sidebar-submenu {
    list-style: none;
    padding: 8px 0 8px 20px;
    margin: 0 12px;
    display: none;
    background: transparent;
    border-left: 2px solid var(--gray-200);
    margin-left: 32px;
}

.sidebar-submenu.open {
    display: block;
}

.sidebar-submenu li {
    margin: 2px 0;
    padding-left: 0;
}

.sidebar-submenu li::before {
    display: none !important;
}

.sidebar-submenu li a {
    display: block;
    padding: 8px 16px;
    color: var(--gray-500);
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition-fast);
    position: relative;
    border-radius: 8px;
}

.sidebar-submenu li a:hover {
    color: var(--primary-600);
    background: var(--primary-50);
}

.sidebar-submenu li a.active {
    color: var(--primary-600);
    font-weight: 600;
    background: var(--primary-50);
}

.nav-toggle {
    margin-left: auto;
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    opacity: 0.5;
    transition: var(--transition-fast);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-toggle:hover {
    opacity: 1;
    background: rgba(99, 102, 241, 0.1);
}

.sidebar-nav > li > a.active .nav-toggle {
    opacity: 0.8;
    color: white;
}

.sidebar-nav > li > a.active .nav-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
}

.nav-toggle.open {
    transform: rotate(90deg);
}

/* ========================================
   MAIN CONTENT
   ======================================== */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 48px 56px;
    min-height: calc(100vh - var(--header-height));
}

.content-wrapper {
    max-width: var(--content-max-width);
    margin: 0 auto;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--gray-900);
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2.5rem;
    padding-bottom: 20px;
    margin-bottom: 32px;
    position: relative;
}

h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

h2 {
    font-size: 1.875rem;
    margin-top: 64px;
    padding-bottom: 16px;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--gray-200), transparent);
}

h3 {
    font-size: 1.5rem;
    margin-top: 40px;
    color: var(--gray-800);
}

h4 {
    font-size: 1.25rem;
    margin-top: 32px;
    color: var(--gray-800);
}

p {
    margin: 0 0 20px;
    color: var(--gray-600);
}

a {
    color: var(--primary-600);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-700);
    text-decoration: underline;
}

strong {
    font-weight: 600;
    color: var(--gray-800);
}

/* ========================================
   LISTS
   ======================================== */
ul, ol {
    margin: 0 0 24px;
    padding-left: 0;
    list-style: none;
}

li {
    margin-bottom: 10px;
    padding-left: 24px;
    position: relative;
    color: var(--gray-600);
    line-height: 1.6;
}

/* Unordered list bullets */
ul:not(.steps):not(.sidebar-nav):not(.sidebar-submenu):not(.toc-list) > li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    background: var(--gradient-primary);
    border-radius: 50%;
}
.steps li ul li::before {
    top: 15px !important;
}

/* Ordered list numbers */
ol:not(.steps) {
    counter-reset: list-counter;
}

ol:not(.steps) > li {
    counter-increment: list-counter;
    padding-left: 32px;
}

ol:not(.steps) > li::before {
    content: counter(list-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 22px;
    height: 22px;
    background: var(--primary-100);
    color: var(--primary-700);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Nested lists */
li > ul, li > ol {
    margin-top: 10px;
    margin-bottom: 0;
}

/* Nested unordered lists - smaller bullets */
li > ul > li::before {
    width: 5px;
    height: 5px;
    top: 11px;
    background: var(--primary-300);
}

/* Nested ordered lists - simpler style */
li > ol > li::before {
    width: 18px;
    height: 18px;
    font-size: 11px;
    background: var(--gray-100);
    color: var(--gray-600);
}

/* ========================================
   TABLES
   ======================================== */
.table-wrapper {
    overflow-x: auto;
    margin: 24px 0 32px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: white;
}

th, td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--gray-100);
}

th {
    background: var(--gray-800);
    color: white;
    font-weight: 600;
    white-space: nowrap;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.05em;
}

th:first-child {
    border-radius: var(--border-radius) 0 0 0;
}

th:last-child {
    border-radius: 0 var(--border-radius) 0 0;
}

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

tr:last-child td:first-child {
    border-radius: 0 0 0 var(--border-radius);
}

tr:last-child td:last-child {
    border-radius: 0 0 var(--border-radius) 0;
}

tbody tr {
    transition: var(--transition-fast);
}

tbody tr:hover {
    background: var(--gray-50);
}

/* ========================================
   CODE BLOCKS
   ======================================== */
code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--primary-50);
    color: var(--primary-700);
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 500;
}

pre {
    background: var(--gray-900);
    color: #e4e4e7;
    padding: 24px;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin: 24px 0 32px;
    font-size: 14px;
    line-height: 1.6;
    box-shadow: var(--shadow-lg);
    position: relative;
}

pre::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
    font-weight: 400;
}

/* Syntax Highlighting */
.code-keyword { color: #c792ea; }
.code-string { color: #c3e88d; }
.code-comment { color: #676e95; font-style: italic; }
.code-function { color: #82aaff; }
.code-variable { color: #f78c6c; }
.code-number { color: #f78c6c; }

/* Code Wrapper & Copy Button */
.code-wrapper {
    position: relative;
}

.copy-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    opacity: 0;
    transition: var(--transition-fast);
    font-family: var(--font-family);
}

.code-wrapper:hover .copy-btn {
    opacity: 1;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.copy-btn.copied {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

/* ========================================
   CALLOUTS / ALERTS
   ======================================== */
.callout {
    padding: 20px 24px;
    border-radius: var(--border-radius);
    margin: 24px 0 32px;
    border-left: 4px solid;
    position: relative;
    overflow: hidden;
}

.callout::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.03;
    pointer-events: none;
}

.callout-title {
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
}

.callout-title svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

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

.callout-info {
    background: linear-gradient(135deg, var(--info-light), white);
    border-color: var(--info);
}

.callout-info .callout-title {
    color: var(--info);
}

.callout-warning {
    background: linear-gradient(135deg, var(--warning-light), white);
    border-color: var(--warning);
}

.callout-warning .callout-title {
    color: #b45309;
}

.callout-danger {
    background: linear-gradient(135deg, var(--danger-light), white);
    border-color: var(--danger);
}

.callout-danger .callout-title {
    color: var(--danger);
}

.callout-success {
    background: linear-gradient(135deg, var(--success-light), white);
    border-color: var(--success);
}

.callout-success .callout-title {
    color: var(--success);
}

/* ========================================
   BADGES
   ======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-success {
    background: var(--success-light);
    color: #059669;
}

.badge-warning {
    background: var(--warning-light);
    color: #b45309;
}

.badge-danger {
    background: var(--danger-light);
    color: #dc2626;
}

.badge-info {
    background: var(--info-light);
    color: #2563eb;
}

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

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-fast);
    font-family: var(--font-family);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px -10px rgba(99, 102, 241, 0.5);
    text-decoration: none;
}

.btn-outline {
    background: white;
    border: 2px solid var(--gray-200);
    color: var(--gray-700);
}

.btn-outline:hover {
    border-color: var(--primary-500);
    color: var(--primary-600);
    text-decoration: none;
}

.btn-whatsapp {
    background: var(--whatsapp);
    color: white;
    box-shadow: 0 10px 30px -10px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp:hover {
    background: var(--whatsapp-dark);
    transform: translateY(-3px);
    text-decoration: none;
}

/* ========================================
   CARDS
   ======================================== */
.card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    margin: 24px 0;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-200);
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--gray-900);
}

/* ========================================
   FEATURE GRID
   ======================================== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.feature-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition-base);
}

.feature-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-5px);
    border-color: transparent;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: var(--shadow-primary);
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.feature-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--gray-900);
}

.feature-desc {
    font-size: 14px;
    color: var(--gray-500);
    margin: 0;
    line-height: 1.6;
}

/* ========================================
   STEPS - Modern Card Style
   ======================================== */
.steps {
    counter-reset: step;
    list-style: none !important;
    padding: 0;
    margin: 32px 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.steps > li {
    position: relative;
    padding: 28px 28px 28px 90px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    margin: 0;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    border-left: none;
}

.steps > li:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-200);
}

.steps > li:last-child {
    border-left: 1px solid var(--gray-200);
    padding-bottom: 28px;
}

.steps > li:last-child:hover {
    border-color: var(--primary-200);
}

.steps > li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 24px;
    top: 24px;
    width: 44px;
    height: 44px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    box-shadow: var(--shadow-primary);
}

/* Reset nested lists inside steps */
.steps li ul,
.steps li ol {
    margin: 16px 0 8px 0;
    padding: 0;
}

.steps li ul li,
.steps li ol li {
    padding: 6px 0 6px 24px;
    margin: 0;
    background: none;
    border: none;
    box-shadow: none;
    font-size: 15px;
    line-height: 1.6;
}

.steps li ul li:hover,
.steps li ol li:hover {
    box-shadow: none;
    border-color: transparent;
}

.steps li ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 18px;
    width: 6px;
    height: 6px;
    background: var(--primary-400);
    border-radius: 50%;
    font-size: 0;
    box-shadow: none;
}

.steps li ol {
    counter-reset: nested-step;
}

.steps li ol li {
    counter-increment: nested-step;
}

.steps li ol li::before {
    content: counter(nested-step) ".";
    position: absolute;
    left: 0;
    top: 6px;
    width: auto;
    height: auto;
    background: none;
    color: var(--primary-600);
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
    box-shadow: none;
}

.step-title {
    font-weight: 700;
    margin-bottom: 16px;
    font-size: 18px;
    color: var(--gray-900);
    padding-right: 20px;
}

/* Step content paragraphs */
.steps li > p {
    margin-bottom: 12px;
    font-size: 15px;
}

.steps li > p:last-child {
    margin-bottom: 0;
}

/* Callouts inside steps */
.steps li .callout {
    margin: 16px 0 8px 0;
}

/* ========================================
   FLOWCHART
   ======================================== */
.flowchart {
    background: var(--gray-900);
    border-radius: var(--border-radius);
    padding: 32px;
    margin: 32px 0;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre;
    color: #e4e4e7;
    box-shadow: var(--shadow-lg);
}

/* ========================================
   IMAGES
   ======================================== */
.doc-image {
    max-width: 100%;
    border-radius: var(--border-radius);
    margin: 24px 0;
    box-shadow: var(--shadow-lg);
}

.image-caption {
    text-align: center;
    font-size: 14px;
    color: var(--gray-500);
    margin-top: -16px;
    margin-bottom: 32px;
    font-style: italic;
}

/* Screenshot Placeholder */
.screenshot-placeholder {
    background: linear-gradient(135deg, var(--gray-100), var(--gray-50));
    border: 2px dashed var(--gray-300);
    border-radius: var(--border-radius);
    padding: 80px 24px;
    text-align: center;
    margin: 24px 0 32px;
}

.screenshot-placeholder p {
    margin: 0;
    color: var(--gray-400);
    font-size: 14px;
    font-weight: 500;
}

/* ========================================
   TABLE OF CONTENTS
   ======================================== */
.toc {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    margin: 32px 0;
    box-shadow: var(--shadow-sm);
}

.toc-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 10px;
}

.toc-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    columns: 2;
    column-gap: 32px;
}

.toc-list li {
    margin-bottom: 12px;
    break-inside: avoid;
    padding-left: 0;
}

.toc-list li::before {
    display: none;
}

.toc-list a {
    color: var(--gray-600);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.toc-list a::before {
    content: '→';
    color: var(--primary-400);
    font-weight: 600;
}

.toc-list a:hover {
    background: var(--primary-50);
    color: var(--primary-600);
    text-decoration: none;
}

/* ========================================
   VERSION INFO
   ======================================== */
.version-info {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    background: white;
    padding: 16px 24px;
    border-radius: var(--border-radius);
    font-size: 14px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.version-info span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-600);
}

.version-info span strong {
    color: var(--gray-900);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--gradient-header);
    color: white;
    padding: 48px 56px;
    margin-left: var(--sidebar-width);
    margin-top: 80px;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.footer-content {
    max-width: var(--content-max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: white;
    text-decoration: none;
}

.footer-copy {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
}

/* ========================================
   BACK TO TOP
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 52px;
    height: 52px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-primary);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition-base);
    z-index: 800;
}

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

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px -10px rgba(99, 102, 241, 0.5);
}

/* ========================================
   TABS
   ======================================== */
.tabs {
    margin-bottom: 32px;
}

.tab-buttons {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--gray-200);
}

.tab-btn {
    padding: 16px 24px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-500);
    transition: var(--transition-fast);
    font-family: var(--font-family);
}

.tab-btn:hover {
    color: var(--gray-700);
}

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

.tab-content {
    display: none;
    padding-top: 24px;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   ACCORDION
   ======================================== */
.accordion {
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    margin: 24px 0;
    overflow: hidden;
    background: white;
}

.accordion-item {
    border-bottom: 1px solid var(--gray-200);
}

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

.accordion-header {
    padding: 20px 24px;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
    transition: var(--transition-fast);
    font-family: var(--font-family);
}

.accordion-header:hover {
    background: var(--gray-50);
    color: var(--primary-600);
}

.accordion-header svg {
    transition: transform var(--transition-fast);
    color: var(--gray-400);
}

.accordion-item.open .accordion-header {
    background: var(--primary-50);
    color: var(--primary-700);
}

.accordion-item.open .accordion-header svg {
    transform: rotate(180deg);
    color: var(--primary-500);
}

.accordion-content {
    display: none;
    padding: 0 24px 24px;
    color: var(--gray-600);
}

.accordion-item.open .accordion-content {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ========================================
   SEARCH RESULTS
   ======================================== */
.search-results {
    position: absolute;
    top: calc(100% - 12px);
    left: 20px;
    right: 20px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    max-height: 320px;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    display: none;
    z-index: 100;
}

.search-results.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

.search-result-item {
    padding: 14px 18px;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: var(--transition-fast);
}

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

.search-result-item:hover {
    background: var(--primary-50);
}

.search-result-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-800);
}

.search-result-title strong {
    color: var(--primary-600);
    background: var(--primary-100);
    padding: 0 2px;
    border-radius: 2px;
}

.search-result-section {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 4px;
}

/* ========================================
   SIDEBAR OVERLAY (MOBILE)
   ======================================== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 850;
}

.sidebar-overlay.visible {
    display: block;
    animation: fadeIn 0.2s ease;
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .header,
    .sidebar,
    .back-to-top,
    .footer,
    .copy-btn {
        display: none !important;
    }

    .main-content {
        margin: 0;
        padding: 20px;
    }

    pre {
        white-space: pre-wrap;
        word-wrap: break-word;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .card,
    .feature-card,
    .callout {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1200px) {
    :root {
        --sidebar-width: 280px;
    }

    .main-content {
        padding: 40px 40px;
    }
}

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

    .feature-grid {
        grid-template-columns: 1fr;
    }
}

/* Fix for 769px-834px viewport overflow - version-info */
@media (min-width: 769px) and (max-width: 834px) {
    .version-info {
        flex-wrap: wrap;
        gap: 12px 20px;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .menu-toggle {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
        width: 300px;
        box-shadow: var(--shadow-xl);
    }

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

    .main-content {
        margin-left: 0;
        padding: 24px 20px;
    }

    .footer {
        margin-left: 0;
        padding: 32px 20px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    h1 {
        font-size: 1.875rem;
    }

    h2 {
        font-size: 1.5rem;
        margin-top: 48px;
    }

    h3 {
        font-size: 1.25rem;
    }

    .toc-list {
        columns: 1;
    }

    .header-nav {
        display: none;
    }

    .header {
        padding: 0 16px;
    }

    .version-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .steps > li {
        padding-left: 70px;
        padding-top: 24px;
    }

    .steps > li::before {
        left: 12px;
        top: 20px;
        width: 40px;
        height: 40px;
        font-size: 16px;
        border-radius: 10px;
    }

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

    .tab-btn {
        padding: 14px 18px;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 20px 16px;
    }

    .card,
    .feature-card {
        padding: 24px;
    }

    .callout {
        padding: 16px 18px;
    }

    pre {
        padding: 18px;
        font-size: 13px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 14px;
        width: 100%;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sidebar-nav > li {
    animation: slideIn 0.3s ease forwards;
    opacity: 0;
    list-style: none !important;
}

.sidebar-nav > li:nth-child(1) { animation-delay: 0.05s; }
.sidebar-nav > li:nth-child(2) { animation-delay: 0.1s; }
.sidebar-nav > li:nth-child(3) { animation-delay: 0.15s; }
.sidebar-nav > li:nth-child(4) { animation-delay: 0.2s; }
.sidebar-nav > li:nth-child(5) { animation-delay: 0.25s; }
.sidebar-nav > li:nth-child(6) { animation-delay: 0.3s; }
.sidebar-nav > li:nth-child(7) { animation-delay: 0.35s; }
.sidebar-nav > li:nth-child(8) { animation-delay: 0.4s; }
.sidebar-nav > li:nth-child(9) { animation-delay: 0.45s; }
.sidebar-nav > li:nth-child(10) { animation-delay: 0.5s; }
.sidebar-nav > li:nth-child(11) { animation-delay: 0.55s; }
.sidebar-nav > li:nth-child(12) { animation-delay: 0.6s; }
.sidebar-nav > li:nth-child(13) { animation-delay: 0.65s; }
.sidebar-nav > li:nth-child(14) { animation-delay: 0.7s; }
.sidebar-nav > li:nth-child(15) { animation-delay: 0.75s; }

/* Section animations */
section {
    animation: fadeIn 0.5s ease forwards;
}

/* Hover lift effect for interactive elements */
.feature-card,
.card,
.btn-primary,
.back-to-top {
    will-change: transform;
}
