:root {
    --docs-bg: #f4f8fc;
    --docs-surface: #ffffff;
    --docs-surface-alt: #eef6ff;
    --docs-border: #dfeaf6;
    --docs-text: #0f213a;
    --docs-text-soft: #53657d;
    --docs-primary: #078cff;
    --docs-primary-dark: #0a5cb3;
    --docs-accent: #00b9ff;
    --docs-warning: #f59e0b;
    --docs-info: #0ea5e9;
    --docs-shadow: 0 20px 45px rgba(6, 39, 77, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.docs-body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--docs-bg);
    color: var(--docs-text);
    line-height: 1.7;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(1200px, 92%);
    margin: 0 auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.25s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--docs-primary), var(--docs-accent));
    color: #fff;
    box-shadow: 0 14px 28px rgba(7, 140, 255, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    border-color: var(--docs-border);
    color: var(--docs-text);
}

.docs-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--docs-border);
    box-shadow: 0 6px 18px rgba(15, 33, 58, 0.04);
}

.docs-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 18px;
}

.docs-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    color: var(--docs-text);
    text-decoration: none;
}

.docs-brand img {
    width: 42px;
    height: 42px;
    border-radius: 12px;
}

.docs-search {
    flex: 1;
    max-width: 540px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--docs-bg);
    border: 1px solid var(--docs-border);
    border-radius: 12px;
    padding: 0 14px;
    min-height: 46px;
}

.docs-search input {
    border: 0;
    flex: 1;
    background: transparent;
    color: var(--docs-text);
    font-size: 14px;
    outline: none;
}

.docs-search i {
    color: var(--docs-text-soft);
}

.docs-header-cta {
    white-space: nowrap;
}

.docs-menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid var(--docs-border);
    background: var(--docs-surface);
    color: var(--docs-text);
    font-size: 18px;
    cursor: pointer;
}

.docs-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 28px;
    padding: 32px 0 60px;
}

.docs-sidebar {
    position: sticky;
    top: 82px;
    align-self: start;
    background: var(--docs-surface);
    border: 1px solid var(--docs-border);
    border-radius: 12px;
    box-shadow: 0 10px 26px rgba(6, 39, 77, 0.06);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
}

.docs-sidebar::-webkit-scrollbar {
    width: 8px;
}

.docs-sidebar::-webkit-scrollbar-thumb {
    background: rgba(7, 140, 255, 0.28);
    border-radius: 999px;
}

.docs-sidebar-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--docs-border);
    background: linear-gradient(135deg, #f5fbff, #edf5ff);
    font-weight: 700;
}

.docs-nav {
    padding: 14px 12px 18px;
}

.nav-group {
    margin-bottom: 12px;
}

.nav-group h3 {
    margin: 0 10px 8px;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--docs-text-soft);
}

.nav-item {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--docs-text);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 4px;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(7, 140, 255, 0.08);
    color: var(--docs-primary-dark);
}

.docs-main {
    background: transparent;
    min-width: 0;
    overflow: hidden;
}

.docs-main h1,
.docs-main h2,
.docs-main h3,
.docs-main h4 {
    color: var(--docs-text);
}

.docs-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0 20px;
    color: var(--docs-text-soft);
    font-size: 14px;
}

.docs-breadcrumb a {
    color: var(--docs-primary-dark);
    text-decoration: none;
}

.docs-section {
    background: var(--docs-surface);
    border: 1px solid var(--docs-border);
    border-radius: 18px;
    box-shadow: var(--docs-shadow);
    padding: 28px;
    margin-bottom: 24px;
    scroll-margin-top: 110px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.docs-section:hover {
    transform: translateY(-1px);
    box-shadow: 0 24px 50px rgba(13, 36, 64, 0.08);
}

.docs-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 8px 0;
    flex-wrap: wrap;
}

.docs-hero > div {
    min-width: 0;
}

.eyebrow {
    margin: 0 0 10px;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--docs-primary);
    font-weight: 700;
}

.docs-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(2.1rem, 4vw, 3rem);
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.docs-hero p {
    max-width: 700px;
    margin: 0;
    color: var(--docs-text-soft);
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.docs-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.feature-card {
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    border: 1px solid var(--docs-border);
    border-radius: 18px;
    padding: 22px;
    box-shadow: var(--docs-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(8, 72, 123, 0.12);
}

.card-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    margin-bottom: 18px;
    background: linear-gradient(135deg, rgba(7, 140, 255, 0.12), rgba(0, 185, 255, 0.16));
    color: var(--docs-primary-dark);
    font-size: 22px;
}

.mikrotik-icon {
    overflow: hidden;
    border-radius: 50%;
    background: #f1f6fc;
    border: 1px solid rgba(91, 133, 181, 0.18);
}

.mikrotik-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: block;
}

.feature-card h3 {
    margin: 0 0 8px;
}

.feature-card p {
    margin: 0;
    color: var(--docs-text-soft);
}

.notice {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px 20px;
    border-radius: 16px;
    margin-bottom: 24px;
    border: 1px solid transparent;
}

.notice h4 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notice p {
    margin: 0;
}

.note-info {
    background: rgba(14, 165, 233, 0.08);
    border-color: rgba(14, 165, 233, 0.25);
    color: var(--docs-text);
}

.note-warning {
    background: rgba(245, 158, 11, 0.09);
    border-color: rgba(245, 158, 11, 0.25);
    color: var(--docs-text);
}

.docs-section h2 {
    margin-top: 0;
    margin-bottom: 18px;
    font-size: clamp(1.5rem, 2vw, 2rem);
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 22px;
}

.article-content {
    min-width: 0;
}

.article-content p,
.article-content li,
.docs-section p,
.docs-section li {
    color: var(--docs-text-soft);
}

.article-content ol,
.docs-section ul,
.docs-section ol {
    padding-left: 20px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.mini-card {
    background: var(--docs-surface-alt);
    border: 1px solid var(--docs-border);
    border-radius: 14px;
    padding: 18px;
}

.mini-card h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1rem;
}

.mini-card ul {
    margin: 0;
    padding-left: 18px;
}

.toc {
    background: var(--docs-surface-alt);
    border: 1px solid var(--docs-border);
    border-radius: 14px;
    padding: 16px;
    align-self: start;
}

.toc h4 {
    margin: 0 0 12px;
    font-size: 14px;
}

.toc ul {
    margin: 0;
    padding-left: 18px;
}

.toc a {
    color: var(--docs-primary-dark);
    text-decoration: none;
}

.docs-footer-nav {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--docs-border);
}

@media (max-width: 940px) {
    .docs-shell {
        grid-template-columns: 1fr;
    }

    .docs-sidebar {
        position: static;
        display: none;
    }

    .docs-sidebar.open {
        display: block;
    }

    .docs-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .docs-header-inner {
        flex-wrap: wrap;
    }

    .docs-search {
        order: 3;
        width: 100%;
        max-width: unset;
    }

    .docs-header-cta {
        display: none;
    }
}

@media (max-width: 640px) {
    .docs-section,
    .feature-card {
        padding: 18px;
    }

    .docs-grid {
        grid-template-columns: 1fr;
    }

    .article-layout {
        grid-template-columns: 1fr;
    }

    .docs-footer-nav {
        flex-direction: column;
    }
}
