/* 100docs Modern Knowledge Base & Documentation Stylesheet */
:root {
    --doc-primary: #3b82f6;
    --doc-primary-hover: #2563eb;
    --doc-primary-soft: #eff6ff;
    --doc-success: #10b981;
    --doc-warning: #f59e0b;
    --doc-danger: #ef4444;
    --doc-dark: #0f172a;
    --doc-text-main: #1e293b;
    --doc-text-muted: #64748b;
    --doc-bg-body: #f8fafc;
    --doc-bg-card: #ffffff;
    --doc-border: #e2e8f0;
    --doc-border-light: #f1f5f9;
    --doc-radius: 12px;
    --doc-radius-lg: 16px;
    --doc-shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --doc-shadow: 0 4px 20px rgba(0,0,0,0.05);
    --doc-shadow-hover: 0 10px 25px rgba(0,0,0,0.08);
}

body {
    background-color: var(--doc-bg-body);
    color: var(--doc-text-main);
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
}

/* Reading Progress Bar */
#reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #10b981, #f59e0b);
    width: 0%;
    z-index: 9999;
    transition: width 0.1s linear;
}

/* Navbar */
.doc-navbar {
    background: #ffffff;
    border-bottom: 1px solid var(--doc-border);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1030;
}
.doc-brand {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--doc-dark);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
.doc-brand-badge {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #fff;
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Hero section on Home */
.doc-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    padding: 45px 0 35px 0;
    border-radius: 0 0 24px 24px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
}
.doc-search-box {
    position: relative;
    max-width: 680px;
    margin: 0 auto;
}
.doc-search-box input {
    background: #ffffff;
    border: 2px solid transparent;
    padding: 14px 20px 14px 48px;
    font-size: 1rem;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}
.doc-search-box input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25);
}
.doc-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.2rem;
}

/* Sidebar Navigation */
.doc-sidebar {
    background: var(--doc-bg-card);
    border: 1px solid var(--doc-border);
    border-radius: var(--doc-radius);
    padding: 20px;
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    box-shadow: var(--doc-shadow-sm);
}
.doc-sidebar::-webkit-scrollbar { width: 4px; }
.doc-sidebar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

.doc-cat-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 800;
    color: var(--doc-text-muted);
    margin-top: 15px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.doc-cat-title:first-child { margin-top: 0; }

.doc-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    margin-bottom: 3px;
    color: var(--doc-text-main);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}
.doc-nav-item:hover {
    background: #f1f5f9;
    color: var(--doc-primary-hover);
}
.doc-nav-item.active {
    background: var(--doc-primary-soft);
    color: var(--doc-primary-hover);
    font-weight: 700;
    border-color: #bfdbfe;
    border-left: 4px solid var(--doc-primary);
}

/* Main Article Content Container */
.doc-article-card {
    background: var(--doc-bg-card);
    border: 1px solid var(--doc-border);
    border-radius: var(--doc-radius-lg);
    padding: 40px;
    box-shadow: var(--doc-shadow);
    margin-bottom: 30px;
}
@media (max-width: 768px) {
    .doc-article-card { padding: 22px 18px; }
}

.doc-article-header {
    border-bottom: 1px solid var(--doc-border);
    padding-bottom: 20px;
    margin-bottom: 28px;
}
.doc-article-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--doc-dark);
    line-height: 1.35;
    margin-bottom: 12px;
}
.doc-meta {
    font-size: 0.84rem;
    color: var(--doc-text-muted);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}

/* Article Body Typography */
.doc-body {
    font-size: 1.02rem;
    color: #334155;
}
.doc-body h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--doc-dark);
    margin-top: 36px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--doc-border-light);
    display: flex;
    align-items: center;
    gap: 8px;
    scroll-margin-top: 90px;
}
.doc-body h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 26px;
    margin-bottom: 12px;
    scroll-margin-top: 90px;
}
.doc-body p { margin-bottom: 16px; }
.doc-body ul, .doc-body ol { margin-bottom: 18px; padding-left: 24px; }
.doc-body li { margin-bottom: 6px; }
.doc-body strong { color: #0f172a; font-weight: 700; }

/* Callout Alerts */
.doc-callout {
    padding: 16px 20px;
    border-radius: var(--doc-radius);
    margin: 24px 0;
    border-left: 4px solid;
    font-size: 0.95rem;
}
.doc-callout-info {
    background-color: #eff6ff;
    border-color: #3b82f6;
    color: #1e40af;
}
.doc-callout-success {
    background-color: #ecfdf5;
    border-color: #10b981;
    color: #065f46;
}
.doc-callout-warning {
    background-color: #fffbeb;
    border-color: #f59e0b;
    color: #92400e;
}
.doc-callout-danger {
    background-color: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
}

/* Quote Box */
.doc-quote {
    background: #f8fafc;
    border-left: 4px solid #64748b;
    padding: 15px 20px;
    border-radius: 0 var(--doc-radius) var(--doc-radius) 0;
    font-style: italic;
    color: #475569;
    margin: 20px 0;
}

/* Feature & Stat Highlight Boxes */
.doc-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 24px 0;
}
.doc-stat-card {
    background: #f8fafc;
    border: 1px solid var(--doc-border);
    border-radius: var(--doc-radius);
    padding: 16px;
    text-align: center;
}
.doc-stat-num {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--doc-primary);
    line-height: 1.1;
    margin-bottom: 4px;
}
.doc-stat-lbl {
    font-size: 0.8rem;
    color: var(--doc-text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

/* Table of Contents (TOC) Right Sidebar */
.doc-toc-card {
    background: var(--doc-bg-card);
    border: 1px solid var(--doc-border);
    border-radius: var(--doc-radius);
    padding: 20px;
    position: sticky;
    top: 80px;
    box-shadow: var(--doc-shadow-sm);
    font-size: 0.85rem;
}
.doc-toc-title {
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--doc-text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.doc-toc-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}
.doc-toc-list li { margin-bottom: 6px; }
.doc-toc-link {
    color: var(--doc-text-muted);
    text-decoration: none;
    display: block;
    padding: 3px 0 3px 10px;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
}
.doc-toc-link:hover, .doc-toc-link.active {
    color: var(--doc-primary);
    border-left-color: var(--doc-primary);
    font-weight: 600;
    padding-left: 12px;
}
.doc-toc-link.sub {
    padding-left: 18px;
    font-size: 0.8rem;
}

/* Call-To-Action (CTA) Boxes */
.doc-cta-box {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #ffffff;
    border-radius: var(--doc-radius-lg);
    padding: 28px;
    margin: 35px 0 15px 0;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.2);
    position: relative;
    overflow: hidden;
}
.doc-cta-box::after {
    content: '';
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 150px;
    height: 150px;
    background: rgba(59, 130, 246, 0.15);
    border-radius: 50%;
    pointer-events: none;
}

/* Category Grid on Home */
.doc-cat-card {
    background: var(--doc-bg-card);
    border: 1px solid var(--doc-border);
    border-radius: var(--doc-radius);
    padding: 22px;
    transition: all 0.25s ease;
    height: 100%;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}
.doc-cat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--doc-shadow-hover);
    border-color: #cbd5e1;
    color: inherit;
}
.doc-cat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 14px;
}

/* Article List Cards */
.doc-item-card {
    background: var(--doc-bg-card);
    border: 1px solid var(--doc-border);
    border-radius: var(--doc-radius);
    padding: 20px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    margin-bottom: 15px;
}
.doc-item-card:hover {
    transform: translateY(-2px);
    border-color: #93c5fd;
    box-shadow: var(--doc-shadow-hover);
    color: inherit;
}

/* FAQ Accordion Styling */
.doc-accordion .accordion-item {
    border: 1px solid var(--doc-border);
    border-radius: var(--doc-radius) !important;
    margin-bottom: 12px;
    overflow: hidden;
}
.doc-accordion .accordion-button {
    font-weight: 600;
    color: #1e293b;
    background-color: #ffffff;
    box-shadow: none;
}
.doc-accordion .accordion-button:not(.collapsed) {
    background-color: var(--doc-primary-soft);
    color: var(--doc-primary-hover);
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .doc-sidebar { position: static; max-height: none; margin-bottom: 20px; }
    .doc-toc-card { display: none; }
}
