:root {
    --docs-bg: #f6f7fb;
    --docs-surface: #ffffff;
    --docs-border: #e3e7ef;
    --docs-text: #1c2434;
    --docs-muted: #687386;
    --docs-primary: #5865f2;
}

.docs-body {
    min-height: 100vh;
    margin: 0;
    background: var(--docs-bg);
    color: var(--docs-text);
}

.docs-topbar {
    position: sticky;
    z-index: 10;
    top: 0;
    display: flex;
    min-height: 68px;
    padding: 0 24px;
    border-bottom: 1px solid var(--docs-border);
    background: rgba(255,255,255,.96);
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    backdrop-filter: blur(12px);
}

.docs-brand {
    display: flex;
    color: var(--docs-text);
    text-decoration: none;
    align-items: center;
    gap: 10px;
}

.docs-brand-logo {
    display: grid;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, #5865f2, #424cc4);
    color: white;
    place-items: center;
    font-weight: 900;
}

.docs-brand strong,
.docs-brand small {
    display: block;
}

.docs-brand small {
    color: var(--docs-muted);
    font-size: 11px;
}

.docs-top-actions {
    display: flex;
    align-items: center;
    gap: 13px;
}

.docs-top-actions > a:not(.button) {
    color: var(--docs-muted);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
}

.docs-shell,
.docs-article-shell {
    width: min(1100px, calc(100% - 40px));
    margin: 0 auto;
    padding: 44px 0 70px;
}

.docs-hero {
    padding: 42px;
    border: 1px solid var(--docs-border);
    border-radius: 20px;
    background: white;
    box-shadow: 0 18px 50px rgba(20,29,45,.05);
}

.docs-eyebrow {
    color: var(--docs-primary);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.docs-hero h1,
.docs-article h1 {
    margin: 7px 0 10px;
    font-size: clamp(30px, 5vw, 46px);
    line-height: 1.08;
}

.docs-hero > p,
.docs-article-summary {
    max-width: 730px;
    color: var(--docs-muted);
    line-height: 1.65;
}

.docs-search {
    display: block;
    max-width: 620px;
    margin-top: 24px;
}

.docs-search span {
    display: block;
    margin-bottom: 7px;
    font-size: 11px;
    font-weight: 800;
}

.docs-search input {
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    padding: 11px 14px;
    border: 1px solid var(--docs-border);
    border-radius: 11px;
    font: inherit;
    outline: none;
}

.docs-search input:focus {
    border-color: var(--docs-primary);
    box-shadow: 0 0 0 3px rgba(88,101,242,.10);
}

.docs-category {
    margin-top: 34px;
}

.docs-category-heading h2 {
    margin: 0 0 5px;
    font-size: 22px;
}

.docs-category-heading p {
    margin: 0;
    color: var(--docs-muted);
    font-size: 13px;
}

.docs-card-grid {
    display: grid;
    margin-top: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.docs-card {
    padding: 17px;
    border: 1px solid var(--docs-border);
    border-radius: 13px;
    background: var(--docs-surface);
    color: var(--docs-text);
    text-decoration: none;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.docs-card:hover {
    transform: translateY(-2px);
    border-color: #cfd4ff;
    box-shadow: 0 10px 30px rgba(20,29,45,.06);
}

.docs-card-title {
    font-size: 15px;
    font-weight: 900;
}

.docs-card p {
    margin: 8px 0 0;
    color: var(--docs-muted);
    font-size: 12px;
    line-height: 1.55;
}

.docs-card-meta {
    display: flex;
    margin-top: 14px;
    color: #9199a8;
    font-size: 10px;
    justify-content: space-between;
    gap: 10px;
}

.docs-empty,
.docs-empty-page,
.docs-no-results {
    padding: 24px;
    border: 1px dashed var(--docs-border);
    border-radius: 12px;
    color: var(--docs-muted);
    text-align: center;
}

.docs-empty-page {
    margin-top: 28px;
    background: white;
}

.docs-no-results {
    margin-top: 22px;
}

.docs-back {
    display: inline-flex;
    margin-bottom: 16px;
    color: var(--docs-primary);
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
}

.docs-article {
    padding: 36px;
    border: 1px solid var(--docs-border);
    border-radius: 18px;
    background: white;
    box-shadow: 0 15px 45px rgba(20,29,45,.05);
}

.docs-article.legal {
    max-width: 880px;
    margin: 0 auto;
}

.docs-article-meta {
    margin-top: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--docs-border);
    color: #9199a8;
    font-size: 11px;
}

.docs-article-content {
    padding-top: 18px;
    font-size: 14px;
    line-height: 1.75;
}

.docs-article-content p {
    margin: 0 0 17px;
}

@media (max-width: 760px) {
    .docs-topbar {
        padding: 0 14px;
    }

    .docs-top-actions > a:not(.button) {
        display: none;
    }

    .docs-shell,
    .docs-article-shell {
        width: min(100% - 24px, 1100px);
        padding-top: 24px;
    }

    .docs-hero,
    .docs-article {
        padding: 22px;
    }

    .docs-card-grid {
        grid-template-columns: 1fr;
    }
}

/* Shared public/dashboard footer compatibility */
.docs-body .site-footer { margin-top: 24px; border-top: 1px solid var(--docs-border); background: #fff; }
.docs-body .footer-inner { display: flex; width: min(1100px, calc(100% - 40px)); min-height: 82px; margin: 0 auto; align-items: center; justify-content: space-between; gap: 18px; }
.docs-body .footer-copy { color: var(--docs-muted); font-size: 12px; }
.docs-body .footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.docs-body .footer-links a { color: var(--docs-muted); text-decoration: none; font-size: 12px; font-weight: 700; }
.docs-body .dashboard-footer { margin-top: 24px; border-top: 1px solid var(--docs-border); background: #fff; }
.docs-body .dashboard-footer-inner { display: flex; width: min(1100px, calc(100% - 40px)); min-height: 72px; margin: 0 auto; align-items: center; justify-content: space-between; gap: 18px; }
.docs-body .dashboard-footer-copy, .docs-body .dashboard-footer-links a { color: var(--docs-muted); font-size: 12px; }
.docs-body .dashboard-footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.docs-body .dashboard-footer-links a { text-decoration: none; font-weight: 700; }
.docs-article-content a { color: var(--docs-primary); text-decoration: underline; }
@media (max-width: 700px) { .docs-body .footer-inner, .docs-body .dashboard-footer-inner { padding: 20px 0; align-items: flex-start; flex-direction: column; } }
.docs-topbar-dashboard { min-height: 72px; border-bottom-color: #e7eaf2; box-shadow: 0 1px 0 rgba(17,24,39,.02); }


/* Keep legal/documentation footer at the viewport bottom on short pages. */
.docs-body {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

.docs-body .docs-shell,
.docs-body .docs-article-shell {
    box-sizing: border-box;
    width: min(1100px, calc(100% - 40px));
    flex: 1 0 auto;
}

.docs-body > .site-footer,
.docs-body > .dashboard-footer {
    width: 100%;
    margin-top: auto !important;
    flex-shrink: 0;
}


/* --------------------------------------------------------------------------
   Documentation sequence / previous-next navigation
   -------------------------------------------------------------------------- */

.docs-pagination {
    display: grid;
    margin-top: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.docs-page-link {
    display: grid;
    min-height: 92px;
    padding: 16px 18px;
    border: 1px solid var(--docs-border);
    border-radius: 14px;
    background: var(--docs-surface);
    color: var(--docs-text);
    text-decoration: none;
    align-content: center;
    gap: 6px;
    transition:
        transform .15s ease,
        border-color .15s ease,
        box-shadow .15s ease;
}

.docs-page-link:hover {
    transform: translateY(-2px);
    border-color: #cfd4ff;
    box-shadow: 0 10px 30px rgba(20,29,45,.06);
}

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

.docs-page-direction {
    color: var(--docs-primary);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .02em;
}

.docs-page-link strong {
    font-size: 14px;
    line-height: 1.35;
}

@media (max-width: 640px) {
    .docs-pagination {
        grid-template-columns: 1fr;
    }

    .docs-page-link.next {
        text-align: left;
    }

    .docs-pagination > span:empty {
        display: none;
    }
}


/* Rich documentation/legal tables */
.novus-doc-article table,
.novus-legal-content table,
.docs-article-content table,
.docs-rich-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.25rem;
    display: block;
    overflow-x: auto;
}

.novus-doc-article th,
.novus-doc-article td,
.novus-legal-content th,
.novus-legal-content td,
.docs-article-content th,
.docs-article-content td,
.docs-rich-content th,
.docs-rich-content td {
    border: 1px solid currentColor;
    padding: 0.65rem 0.75rem;
    text-align: left;
    vertical-align: top;
}

.novus-doc-article th,
.novus-legal-content th,
.docs-article-content th,
.docs-rich-content th {
    font-weight: 700;
}
