:root {
    --docs-primary: #4F46E5;
    --docs-primary-dark: #3730A3;
    --docs-bg: #FFFFFF;
    --docs-sidebar-bg: #FAFCFF;
    --docs-surface: #F8FAFC;
    --docs-border: #E8EEF5;
    --docs-border-light: #F1F5F9;
    --docs-text: #0F172A;
    --docs-text-muted: #64748B;
    --docs-sidebar-w: 250px;
    --docs-toc-w: 240px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- Ultra Thin Gradient Scrollbar --- */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.45) 0%, rgba(56, 189, 248, 0.45) 100%);
    border-radius: 9999px;
    transition: all 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #4F46E5 0%, #0ea5e9 100%);
    box-shadow: 0 0 6px rgba(79, 70, 229, 0.4);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.45) transparent;
}

body.docs-body {
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
    color: var(--docs-text);
    background-color: var(--docs-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* --- Navbar --- */
.docs-navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: 62px;
    background: rgba(11, 15, 25, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
}

.docs-nav-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.docs-logo-wrap {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    color: #F8FAFC;
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

.docs-logo-wrap svg {
    color: #818CF8;
}

.docs-badge-version {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 2px 7px;
    border-radius: 9999px;
    background: rgba(16, 185, 129, 0.12);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.22);
}

.docs-nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.docs-nav-link {
    font-size: 0.88rem;
    font-weight: 400;
    color: #94A3B8;
    text-decoration: none;
    transition: color 0.15s ease;
}

.docs-nav-link:hover {
    color: #FFFFFF;
}

.docs-btn-portal {
    font-size: 0.82rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #F8FAFC;
    text-decoration: none;
    transition: all 0.2s ease;
}

.docs-btn-portal:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.25);
}

/* --- 3-Column Layout --- */
.docs-container {
    max-width: 1520px;
    margin: 0 auto;
    display: flex;
    min-height: calc(100vh - 62px);
    background: var(--docs-bg);
}

/* --- Left Navigation Sidebar --- */
.docs-sidebar {
    width: var(--docs-sidebar-w);
    flex-shrink: 0;
    border-right: 1px solid var(--docs-border);
    padding: 28px 14px 60px 20px;
    height: calc(100vh - 62px);
    position: sticky;
    top: 62px;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--docs-sidebar-bg);
}

.docs-sidebar-group {
    margin-bottom: 22px;
}

.docs-sidebar-title {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94A3B8;
    margin-bottom: 6px;
    padding-left: 8px;
}

.docs-nav-list {
    list-style: none;
}

.docs-nav-item a {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    margin-bottom: 2px;
    border-radius: 7px;
    font-size: 0.86rem;
    font-weight: 450;
    color: #475569;
    text-decoration: none;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.docs-nav-item a:hover {
    background: rgba(226, 232, 240, 0.65);
    color: #0F172A;
    transform: translateX(2px);
}

.docs-nav-item.active a {
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.09) 0%, rgba(99, 102, 241, 0.03) 100%);
    color: #4338CA;
    font-weight: 550;
    border: 1px solid rgba(79, 70, 229, 0.16);
    box-shadow: 0 1px 3px rgba(79, 70, 229, 0.06);
}

.docs-nav-item.active a::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 5px;
    bottom: 5px;
    width: 3px;
    border-radius: 4px;
    background: linear-gradient(180deg, #4F46E5 0%, #38BDF8 100%);
    box-shadow: 0 0 6px rgba(79, 70, 229, 0.5);
}

/* --- Center Content Area --- */
.docs-main-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: space-between;
}

.docs-content-area {
    flex: 1;
    max-width: 840px;
    padding: 38px 42px 80px 42px;
}

.docs-callout {
    display: flex;
    gap: 14px;
    padding: 16px 20px;
    border-radius: 10px;
    margin: 24px 0;
    border: 1px solid transparent;
}

.docs-callout-info {
    background: #F0F7FF;
    border-color: #D0E4FF;
    color: #1E40AF;
}

/* --- Right "On This Page" TOC Sidebar --- */
.docs-toc-sidebar {
    width: var(--docs-toc-w);
    flex-shrink: 0;
    padding: 38px 24px 60px 12px;
    position: sticky;
    top: 62px;
    height: calc(100vh - 62px);
    overflow-y: auto;
}

.docs-toc-header {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94A3B8;
    margin-bottom: 12px;
}

.docs-toc-list {
    list-style: none;
    border-left: 1px solid var(--docs-border);
    padding-left: 12px;
    margin-bottom: 32px;
}

.docs-toc-item {
    margin-bottom: 9px;
}

.docs-toc-item a {
    font-size: 0.82rem;
    color: #64748B;
    text-decoration: none;
    display: block;
    line-height: 1.4;
    transition: color 0.15s ease;
}

.docs-toc-item a:hover {
    color: var(--docs-primary);
}

/* Support Help Card in Right Column */
.docs-support-card {
    background: #F8FAFC;
    border: 1px solid var(--docs-border);
    border-radius: 10px;
    padding: 16px;
    margin-top: 20px;
}

.docs-support-card h5 {
    font-size: 0.82rem;
    font-weight: 600;
    color: #0F172A;
    margin-bottom: 4px;
}

.docs-support-card p {
    font-size: 0.75rem;
    color: #64748B;
    line-height: 1.4;
    margin-bottom: 12px;
}

.docs-btn-support {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #065F46;
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    padding: 6px 10px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.docs-btn-support:hover {
    background: #D1FAE5;
}

@media (max-width: 1200px) {
    .docs-toc-sidebar {
        display: none;
    }
}

@media (max-width: 900px) {
    .docs-sidebar {
        display: none;
    }
    .docs-content-area {
        padding: 30px 20px;
    }
}