:root {
    --sidebar-width: 270px;
    --sidebar-collapse-width: 80px;
    --topbar-height: 65px;
    --border-color: #e9edf5;
    --page-bg: #f7f9fc;
    --primary: #0b72e7;
}

/* BODY */

body {
    margin: 0;
    background: var(--page-bg);
    font-family: Inter, sans-serif;
    font-size: 13px;
    color: #1e293b;
}

/* SIDEBAR */

.sidebar {
    width: var(--sidebar-width);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    background: white;
    border-right: 1px solid var(--border-color);
    transition: .25s;
    overflow-x: hidden;
    z-index: 1000;
}

    .sidebar.collapsed {
        width: var(--sidebar-collapse-width);
    }

.logo-area {
    height: var(--topbar-height);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 22px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.sidebar-menu {
    padding: 18px 12px;
}

.menu-title {
    font-size: 11px;
    color: #94a3b8;
    margin: 18px 10px 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #334155;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 4px;
    font-size: 13px;
    transition: .2s;
}

    .sidebar-link:hover {
        background: #f1f5f9;
        color: var(--primary);
    }

    .sidebar-link.active {
        background: #eaf3ff;
        color: var(--primary);
        font-weight: 600;
    }

    .sidebar-link i {
        font-size: 16px;
        min-width: 20px;
    }

/* COLLAPSE */

.sidebar.collapsed .sidebar-text {
    display: none;
}

.sidebar.collapsed .menu-title {
    display: none;
}

.sidebar.collapsed .sidebar-link {
    justify-content: center;
}

/* TOPBAR */

.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--topbar-height);
    background: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 22px;
    transition: .25s;
    z-index: 999;
}

    .topbar.expanded {
        left: var(--sidebar-collapse-width);
    }

/* MAIN */

.main-wrapper {
    margin-left: var(--sidebar-width);
    padding-top: var(--topbar-height);
    transition: .25s;
}

    .main-wrapper.expanded {
        margin-left: var(--sidebar-collapse-width);
    }

.page-container {
    padding: 25px;
}

/* HAMBURGER */

.hamburger-btn {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: white;
    font-size: 20px;
}

/* SEARCH */

.search-box {
    position: relative;
    width: 280px;
}

    .search-box input {
        height: 40px;
        border-radius: 10px;
        padding-left: 38px;
        font-size: 13px;
    }

    .search-box i {
        position: absolute;
        left: 14px;
        top: 11px;
        color: #94a3b8;
    }

/* GRID */

.api-layout {
    display: grid;
    grid-template-columns: 1fr 450px;
    gap: 22px;
}

    .api-layout > div {
        min-width: 0;
    }

/* HEADER */

.endpoint-header {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 22px;
    width: 100%;
}

.method-box {
    width: 100px;
    height: 58px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.method-post, .method-get {
    background: var(--primary);
}

.endpoint-url {
    padding: 0 20px;
    font-family: Consolas;
    font-size: 14px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* CARD */

.doc-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 22px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}

.section-desc {
    color: #64748b;
    line-height: 1.8;
}

.card-title-custom {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
}

/* TABLE */

.param-table {
    width: 100%;
}

    .param-table tr {
        border-bottom: 1px solid #eef2f7;
    }

    .param-table td {
        padding: 16px 10px;
        vertical-align: top;
    }

.param-name {
    font-weight: 700;
    font-size: 13px;
}

.param-type {
    color: var(--primary);
    font-size: 12px;
}

.param-desc {
    color: #64748b;
    line-height: 1.7;
}

/* AUTH */

.auth-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    padding: 20px;
}

.auth-item {
    display: flex;
    margin-bottom: 15px;
}

.auth-key {
    width: 170px;
    color: var(--primary);
    font-weight: 700;
    font-family: Consolas;
}

/* CODE */

.code-panel {
    background: #0f172a;
    border-radius: 14px;
    overflow: hidden;
}

.code-header {
    height: 55px;
    background: #172554;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    color: white;
}

.code-tab {
    font-size: 13px;
    font-weight: 600;
}

.code-body pre {
    margin: 0 !important;
    font-size: 12px !important;
}


.sub-link {
    padding-left: 52px !important;
    font-size: 13px;
    position: relative;
}

    /* Optional vertical tree line */

    .sub-link::before {
        content: "";
        position: absolute;
        left: 30px;
        top: 0;
        bottom: 0;
        width: 1px;
        background: #E2E8F0
    }

    /* Optional small connector line */

    .sub-link::after {
        content: "";
        position: absolute;
        left: 30px;
        top: 50%;
        width: 14px;
        height: 1px;
        background: #E2E8F0
    }

i.copy-btn {
    cursor: pointer;
}

/* MOBILE */
@media(max-width:1200px) {
    .api-layout {
        grid-template-columns: 1fr;
    }
}

@media(max-width:991px) {

    .sidebar {
        left: -100%;
    }

        .sidebar.mobile-open {
            left: 0;
        }

    .topbar {
        left: 0 !important;
    }

    .main-wrapper {
        margin-left: 0 !important;
    }

    .search-box {
        width: 180px;
    }
}
