:root {
    --hub-bg: #0b1220;
    --hub-surface: #111827;
    --hub-surface-2: #1a2332;
    --hub-border: rgba(255,255,255,0.08);
    --hub-text: #e2e8f0;
    --hub-muted: #94a3b8;
    --hub-primary: #3b82f6;
    --hub-accent: #8b5cf6;
    --hub-code-bg: #0f172a;
    --hub-success: #34d399;
    --hub-danger: #f87171;
    --sidebar-width: 260px;
    --admin-topbar-height: 65px;
    --docs-nav-height: 72px;
}

* { box-sizing: border-box; }

/* Lucide icons (SVG) */
svg.lucide {
    width: 1.1em;
    height: 1.1em;
    stroke-width: 1.75;
    flex-shrink: 0;
    vertical-align: -0.15em;
    display: inline-block;
}

html {
    overflow-x: hidden;
    max-width: 100%;
}

body.hub-body {
    margin: 0;
    font-family: "Segoe UI", Inter, Arial, sans-serif;
    background: var(--hub-bg);
    color: var(--hub-text);
    line-height: 1.6;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body.mobile-menu-open {
    overflow: hidden;
}

.hub-mesh {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 70% 50% at 20% 0%, rgba(59,130,246,0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 20%, rgba(139,92,246,0.12), transparent);
    z-index: 0;
}

/* ── Nav ── */
.hub-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    background: rgba(11,18,32,0.85);
    border-bottom: 1px solid var(--hub-border);
}

.hub-nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.hub-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
}

.hub-brand i { color: #60a5fa; font-size: 1.3rem; }

.hub-nav-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.hub-nav-links a {
    color: var(--hub-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.hub-nav-links a:hover { color: #fff; }

/* ── Mobile menu ── */
.mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--hub-border);
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
}

.mobile-menu-toggle:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.15);
}

.mobile-menu-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    line-height: 1;
}

.mobile-menu-icon svg.lucide {
    width: 1.35rem;
    height: 1.35rem;
}

.mobile-menu-icon-close { display: none; }

.mobile-menu-toggle.is-active .mobile-menu-icon-open { display: none; }
.mobile-menu-toggle.is-active .mobile-menu-icon-close { display: flex; }

.mobile-menu-header {
    display: none;
}

.mobile-menu-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
}

.mobile-menu-brand i {
    font-size: 1.5rem;
    color: #60a5fa;
    filter: drop-shadow(0 0 12px rgba(96,165,250,0.5));
    flex-shrink: 0;
}

.mobile-menu-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.mobile-menu-brand-name {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

.mobile-menu-brand-sub {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #93c5fd;
}

.mobile-menu-backdrop,
.admin-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu-backdrop.is-visible,
.admin-sidebar-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.hub-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.hub-btn-primary {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff !important;
    box-shadow: 0 8px 24px rgba(37,99,235,0.3);
}

.hub-btn-primary:hover {
    transform: translateY(-1px);
    color: #fff;
}

.hub-btn-outline {
    border: 1px solid var(--hub-border);
    background: transparent;
    color: var(--hub-text) !important;
}

.hub-btn-outline:hover {
    color: #fff !important;
    border-color: rgba(255,255,255,0.2);
}

.hub-btn-sm {
    padding: 7px 14px;
    font-size: 0.82rem;
}

.hub-btn-danger-outline {
    border: 1px solid rgba(248,113,113,0.35);
    background: transparent;
    color: var(--hub-danger) !important;
}

.hub-container {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

/* ── Docs landing ── */
.hub-hero {
    padding: 72px 0 48px;
    text-align: center;
}

.hub-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(59,130,246,0.15);
    color: #93c5fd;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.hub-hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 16px;
    background: linear-gradient(135deg, #fff 0%, #93c5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hub-hero p {
    max-width: 640px;
    margin: 0 auto 32px;
    color: var(--hub-muted);
    font-size: 1.1rem;
}

.hub-hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.hub-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 64px;
}

.hub-card {
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: 14px;
    padding: 24px;
}

.hub-card i {
    font-size: 1.5rem;
    color: #60a5fa;
    margin-bottom: 12px;
}

.hub-card h3, .hub-card h4, .hub-card h5 {
    margin: 0 0 8px;
    font-size: 1rem;
    color: #fff;
}

.hub-card p {
    margin: 0;
    color: var(--hub-muted);
    font-size: 0.9rem;
}

.hub-section {
    margin-bottom: 56px;
    scroll-margin-top: 80px;
}

.hub-section h2 {
    font-size: 1.6rem;
    margin: 0 0 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--hub-border);
    color: #fff;
}

.hub-section > p {
    color: var(--hub-muted);
    margin-bottom: 20px;
}

.hub-steps { display: grid; gap: 16px; }

.hub-step {
    display: flex;
    gap: 16px;
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: 12px;
    padding: 20px;
}

.hub-step-num {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.hub-step h4 { margin: 0 0 6px; font-size: 1rem; color: #fff; }
.hub-step p { margin: 0; color: var(--hub-muted); font-size: 0.9rem; }

.hub-code-block {
    background: var(--hub-code-bg);
    border: 1px solid var(--hub-border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

.hub-code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--hub-border);
    font-size: 0.8rem;
    color: var(--hub-muted);
}

.hub-code-block pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
    font-size: 0.82rem;
    line-height: 1.55;
    color: #cbd5e1;
}

.hub-code-block code { font-family: Consolas, monospace; }

.hub-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--hub-border);
    border-radius: 0;
    margin-bottom: 16px;
}

.hub-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.hub-table th, .hub-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--hub-border);
}

.hub-table th {
    background: rgba(255,255,255,0.03);
    color: var(--hub-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.hub-table tr:last-child td { border-bottom: 0; }
.hub-table code {
    background: rgba(59,130,246,0.15);
    color: #93c5fd;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
}

.hub-alert {
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.hub-alert-info {
    background: rgba(59,130,246,0.12);
    border: 1px solid rgba(59,130,246,0.25);
    color: #93c5fd;
}

.hub-alert-warn {
    background: #fff6dc;
    border: 1px solid #e5c76b;
    color: #121816;
}

.hub-alert-warn strong {
    color: #121816;
}

.hub-alert-warn code {
    background: rgba(18, 24, 22, 0.08);
    color: #121816;
}

.hub-alert-success {
    background: rgba(52,211,153,0.12);
    border: 1px solid rgba(52,211,153,0.25);
    color: #6ee7b7;
}

.hub-alert-danger {
    background: rgba(248,113,113,0.12);
    border: 1px solid rgba(248,113,113,0.25);
    color: #fca5a5;
}

.hub-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.hub-endpoint {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: 10px;
    padding: 12px 18px;
    font-family: Consolas, monospace;
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.hub-method {
    background: #166534;
    color: #86efac;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.75rem;
}

.hub-footer {
    text-align: center;
    padding: 40px 24px;
    color: var(--hub-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--hub-border);
    position: relative;
    z-index: 1;
}

.hub-link { color: #93c5fd; text-decoration: none; }
.hub-link:hover { color: #bfdbfe; }

/* legacy docs class aliases */
.docs-body {
    margin: 0;
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    background: var(--hub-bg);
    color: var(--hub-text);
    line-height: 1.6;
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    padding-top: var(--docs-nav-height);
}

.docs-body img,
.docs-body video,
.docs-body pre,
.docs-body table {
    max-width: 100%;
}

.docs-mesh {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 60% at 15% -10%, rgba(59,130,246,0.22), transparent 55%),
        radial-gradient(ellipse 70% 50% at 85% 10%, rgba(139,92,246,0.18), transparent 50%),
        radial-gradient(ellipse 50% 40% at 50% 100%, rgba(37,99,235,0.1), transparent 60%);
    z-index: 0;
}

.docs-grid-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 20%, transparent 75%);
}

.docs-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
    animation: docs-orb-float 18s ease-in-out infinite;
}

.docs-orb-1 {
    width: 420px;
    height: 420px;
    background: rgba(59,130,246,0.35);
    top: -120px;
    left: -80px;
}

.docs-orb-2 {
    width: 360px;
    height: 360px;
    background: rgba(139,92,246,0.3);
    top: 20%;
    right: -100px;
    animation-delay: -6s;
}

.docs-orb-3 {
    width: 280px;
    height: 280px;
    background: rgba(96,165,250,0.2);
    bottom: 10%;
    left: 30%;
    animation-delay: -12s;
}

@keyframes docs-orb-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 15px) scale(0.95); }
}

.docs-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    width: 100%;
    max-width: 100%;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.docs-nav.docs-nav-scrolled {
    background: rgba(11, 18, 32, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

@media (min-width: 993px) {
    .docs-nav {
        background: linear-gradient(
            180deg,
            rgba(11, 18, 32, 0.88) 0%,
            rgba(11, 18, 32, 0.78) 100%
        );
        backdrop-filter: blur(24px) saturate(1.45);
        -webkit-backdrop-filter: blur(24px) saturate(1.45);
        border-bottom: 1px solid rgba(255, 255, 255, 0.09);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.07),
            0 8px 32px rgba(0, 0, 0, 0.28);
    }

    .docs-nav.docs-nav-scrolled {
        background: rgba(11, 18, 32, 0.96);
        backdrop-filter: blur(28px) saturate(1.55);
        -webkit-backdrop-filter: blur(28px) saturate(1.55);
        border-bottom-color: rgba(255, 255, 255, 0.12);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.09),
            0 4px 28px rgba(0, 0, 0, 0.38);
    }
}

.docs-scroll-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    z-index: 110;
    background: linear-gradient(90deg, #8b5cf6, #3b82f6, #22d3ee);
    pointer-events: none;
    transition: width 0.08s linear;
}

.docs-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: nowrap;
    width: 100%;
}

.docs-nav-menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.docs-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    transition: transform 0.25s, opacity 0.25s;
    flex-shrink: 0;
    white-space: nowrap;
}

.docs-brand:hover {
    color: #fff;
    transform: translateY(-1px);
}

.docs-brand i {
    color: #60a5fa;
    font-size: 1.3rem;
    filter: drop-shadow(0 0 12px rgba(96,165,250,0.5));
}

.docs-nav-links {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    flex-shrink: 1;
    min-width: 0;
    flex: 1;
    justify-content: center;
}

.docs-nav-links a {
    color: var(--hub-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 999px;
    white-space: nowrap;
    transition: color 0.2s ease;
    position: relative;
}

.docs-nav-links a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 6px;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, #a78bfa, #38bdf8);
    transition: width 0.25s ease, left 0.25s ease;
}

.docs-nav-links a:hover {
    color: #f8fafc;
    background: transparent;
    transform: none;
}

.docs-nav-links a:hover::after {
    width: 60%;
    left: 20%;
}

.docs-nav .docs-hero-actions {
    flex-shrink: 0;
    margin-bottom: 0 !important;
}

.docs-nav .docs-btn {
    padding: 10px 16px;
    font-size: 0.85rem;
}

.docs-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.92rem;
    border: none;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s, border-color 0.3s, background 0.3s;
    position: relative;
    overflow: hidden;
}

.docs-btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #2563eb 100%);
    background-size: 200% 200%;
    color: #fff !important;
    box-shadow: 0 8px 32px rgba(37,99,235,0.35), inset 0 1px 0 rgba(255,255,255,0.15);
}

.docs-btn-primary::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.25) 50%, transparent 60%);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.docs-btn-primary:hover::before {
    transform: translateX(100%);
}

.docs-btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 16px 48px rgba(37,99,235,0.45), inset 0 1px 0 rgba(255,255,255,0.2);
    color: #fff;
    background-position: 100% 50%;
}

.docs-btn-glow {
    animation: docs-btn-pulse 3s ease-in-out infinite;
}

@keyframes docs-btn-pulse {
    0%, 100% { box-shadow: 0 8px 32px rgba(37,99,235,0.35), inset 0 1px 0 rgba(255,255,255,0.15); }
    50% { box-shadow: 0 8px 40px rgba(124,58,237,0.45), inset 0 1px 0 rgba(255,255,255,0.15); }
}

.docs-btn-outline {
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.03);
    color: var(--hub-text) !important;
    backdrop-filter: blur(8px);
}

.docs-btn-outline:hover {
    color: #fff !important;
    border-color: rgba(96,165,250,0.4);
    background: rgba(59,130,246,0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.docs-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 28px 80px;
    width: 100%;
    overflow-x: hidden;
}

/* ── Hero ── */
.docs-hero {
    padding: 32px 0 80px;
    text-align: left;
}

.docs-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
    width: 100%;
    max-width: 100%;
}

.docs-hero-copy {
    max-width: 560px;
    min-width: 0;
}

.docs-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(59,130,246,0.12);
    border: 1px solid rgba(59,130,246,0.25);
    color: #93c5fd;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.docs-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 12px rgba(52,211,153,0.8);
    animation: docs-pulse-dot 2s ease-in-out infinite;
}

@keyframes docs-pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}

.docs-hero h1 {
    font-size: clamp(2.2rem, 4.5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 20px;
    color: #fff;
    letter-spacing: -0.03em;
    overflow-wrap: anywhere;
}

.docs-gradient-text {
    background: linear-gradient(135deg, #fff 0%, #93c5fd 40%, #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.docs-hero p {
    max-width: none;
    margin: 0 0 32px;
    color: var(--hub-muted);
    font-size: 1.08rem;
    line-height: 1.75;
}

.docs-hero p strong {
    color: #93c5fd;
    font-weight: 600;
}

.docs-hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.docs-hero-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 20px 24px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.docs-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.docs-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.docs-stat-label {
    font-size: 0.78rem;
    color: var(--hub-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.docs-stat-divider {
    width: 1px;
    height: 36px;
    background: rgba(255,255,255,0.1);
}

/* Hero mockup */
.docs-hero-visual {
    position: relative;
    perspective: 1200px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: visible;
    padding: 20px 12px 16px 8px;
    box-sizing: border-box;
}

.docs-mockup {
    position: relative;
    width: 100%;
    max-width: 100%;
    transform: rotateY(-6deg) rotateX(3deg);
    transform-origin: center center;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.docs-mockup:hover {
    transform: rotateY(-3deg) rotateX(2deg) translateY(-8px);
}

.docs-mockup-glow {
    position: absolute;
    inset: -20%;
    background: radial-gradient(ellipse at center, rgba(59,130,246,0.25), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.docs-mockup-window {
    position: relative;
    z-index: 1;
    background: rgba(17,24,39,0.95);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.05),
        0 24px 80px rgba(0,0,0,0.5),
        0 0 60px rgba(59,130,246,0.15);
}

.docs-mockup-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    background: rgba(0,0,0,0.3);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.docs-mockup-bar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
}

.docs-mockup-bar span:nth-child(1) { background: #f87171; }
.docs-mockup-bar span:nth-child(2) { background: #fbbf24; }
.docs-mockup-bar span:nth-child(3) { background: #34d399; }

.docs-mockup-title {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--hub-muted);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.docs-mockup-body {
    display: grid;
    grid-template-columns: 72px 1fr;
    min-height: 220px;
}

.docs-mockup-sidebar {
    padding: 16px 12px;
    border-right: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.docs-mockup-nav {
    height: 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.06);
}

.docs-mockup-nav.active {
    background: linear-gradient(90deg, rgba(59,130,246,0.4), rgba(139,92,246,0.3));
    box-shadow: 0 0 12px rgba(59,130,246,0.3);
}

.docs-mockup-content {
    padding: 18px;
}

.docs-mockup-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.docs-mockup-metric {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 12px;
}

.docs-mockup-metric .m-label {
    display: block;
    font-size: 0.65rem;
    color: var(--hub-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.docs-mockup-metric .m-val {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.docs-mockup-metric.success .m-val { color: #34d399; }

.docs-mockup-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.docs-mockup-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    font-size: 0.78rem;
    color: var(--hub-muted);
    min-width: 0;
}

.docs-mockup-row > span:not(.dot):not(.badge) {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.docs-mockup-row .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.docs-mockup-row .dot.success { background: #34d399; box-shadow: 0 0 8px rgba(52,211,153,0.6); }
.docs-mockup-row .dot.pending { background: #fbbf24; }

.docs-mockup-row .badge {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(52,211,153,0.15);
    color: #6ee7b7;
    border: 1px solid rgba(52,211,153,0.25);
}

.docs-mockup-row .badge.muted {
    background: rgba(255,255,255,0.06);
    color: var(--hub-muted);
    border-color: rgba(255,255,255,0.1);
}

.docs-float-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(17,24,39,0.9);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
    animation: docs-float 5s ease-in-out infinite;
    z-index: 2;
    max-width: calc(100% - 16px);
    box-sizing: border-box;
}

.docs-float-card span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.docs-float-card i {
    color: #60a5fa;
    font-size: 1.1rem;
}

.docs-float-card-1 {
    top: 8px;
    right: 8px;
    animation-delay: 0s;
}

.docs-float-card-2 {
    bottom: 12px;
    left: 8px;
    animation-delay: -2.5s;
}

@keyframes docs-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ── Sections ── */
.docs-section-head {
    text-align: center;
    margin-bottom: 40px;
}

.docs-section-head h2 {
    border: 0;
    padding: 0;
    margin: 0 0 8px;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.docs-section-tag {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(139,92,246,0.12);
    border: 1px solid rgba(139,92,246,0.25);
    color: #c4b5fd;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 16px;
}

.docs-section { margin-bottom: 72px; scroll-margin-top: 88px; }
.docs-section h2 {
    font-size: 1.6rem;
    margin: 0 0 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--hub-border);
    color: #fff;
}
.docs-section > p { color: var(--hub-muted); margin-bottom: 20px; }

.docs-story-sub {
    font-size: 1.1rem;
    color: #93c5fd;
    margin: 0;
}

.docs-story-lead {
    background: linear-gradient(135deg, rgba(59,130,246,0.08), rgba(139,92,246,0.06));
    border: 1px solid rgba(59,130,246,0.18);
    border-radius: 20px;
    padding: 32px 36px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.4s, box-shadow 0.4s, transform 0.4s;
}

.docs-story-lead::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(96,165,250,0.5), transparent);
}

.docs-story-lead:hover {
    border-color: rgba(96,165,250,0.35);
    box-shadow: 0 20px 60px rgba(59,130,246,0.12);
    transform: translateY(-2px);
}

.docs-story-lead p {
    margin: 0;
    color: #cbd5e1;
    font-size: 1.05rem;
    line-height: 1.8;
}

.docs-story-lead strong { color: #fff; font-weight: 600; }

.docs-story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 24px;
    margin-bottom: 28px;
}

.docs-story-card {
    background: rgba(17,24,39,0.6);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), border-color 0.4s, box-shadow 0.4s;
}

.docs-story-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59,130,246,0.08), transparent 50%);
    opacity: 0;
    transition: opacity 0.4s;
}

.docs-story-card:hover {
    transform: translateY(-8px);
    border-color: rgba(96,165,250,0.3);
    box-shadow: 0 24px 64px rgba(0,0,0,0.35), 0 0 40px rgba(59,130,246,0.1);
}

.docs-story-card:hover::before { opacity: 1; }

.docs-story-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(139,92,246,0.15));
    border: 1px solid rgba(59,130,246,0.3);
    display: grid;
    place-items: center;
    margin-bottom: 20px;
    transition: transform 0.4s, box-shadow 0.4s;
}

.docs-story-card:hover .docs-story-icon {
    transform: scale(1.08) rotate(-3deg);
    box-shadow: 0 8px 24px rgba(59,130,246,0.25);
}

.docs-story-icon i {
    font-size: 1.5rem;
    color: #60a5fa;
    transition: color 0.3s;
}

.docs-story-card:hover .docs-story-icon i { color: #93c5fd; }

.docs-story-card h3 {
    margin: 0 0 12px;
    font-size: 1.15rem;
    color: #fff;
    font-weight: 700;
}

.docs-story-card p {
    margin: 0;
    color: var(--hub-muted);
    font-size: 0.95rem;
    line-height: 1.75;
}

.docs-story-closing {
    text-align: center;
    background: linear-gradient(180deg, rgba(17,24,39,0.8), rgba(17,24,39,0.4));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px;
    padding: 44px 36px;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.4s;
}

.docs-story-closing::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(59,130,246,0.3), transparent, rgba(139,92,246,0.3));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s;
}

.docs-story-closing:hover::after { opacity: 1; }

.docs-story-closing:hover {
    box-shadow: 0 24px 64px rgba(0,0,0,0.3);
}

.docs-story-closing p {
    max-width: 720px;
    margin: 0 auto 28px;
    color: #cbd5e1;
    font-size: 1.05rem;
    line-height: 1.8;
}

.docs-story-closing .docs-hero-actions {
    justify-content: center;
}

/* ── Feature cards ── */
.docs-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 80px;
}

.docs-feature-card {
    background: rgba(17,24,39,0.5);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 28px 24px;
    position: relative;
    overflow: hidden;
    cursor: default;
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1), border-color 0.35s, box-shadow 0.35s, background 0.35s;
}

.docs-feature-card::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s;
}

.docs-feature-card:hover {
    transform: translateY(-6px);
    border-color: rgba(96,165,250,0.25);
    background: rgba(17,24,39,0.85);
    box-shadow: 0 20px 48px rgba(0,0,0,0.3), 0 0 32px rgba(59,130,246,0.08);
}

.docs-feature-card:hover::after { transform: scaleX(1); }

.docs-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(59,130,246,0.1);
    border: 1px solid rgba(59,130,246,0.2);
    display: grid;
    place-items: center;
    margin-bottom: 16px;
    transition: transform 0.35s, background 0.35s;
}

.docs-feature-card:hover .docs-feature-icon {
    transform: scale(1.1);
    background: rgba(59,130,246,0.2);
}

.docs-feature-card i,
.docs-feature-icon i {
    font-size: 1.4rem;
    color: #60a5fa;
    margin-bottom: 0;
    transition: color 0.3s, filter 0.3s;
}

.docs-feature-card:hover i,
.docs-feature-card:hover .docs-feature-icon i {
    color: #93c5fd;
    filter: drop-shadow(0 0 8px rgba(96,165,250,0.5));
}

.docs-feature-card h3 {
    margin: 0 0 10px;
    font-size: 1.05rem;
    color: #fff;
    font-weight: 700;
}

.docs-feature-card p {
    margin: 0 0 16px;
    color: var(--hub-muted);
    font-size: 0.9rem;
    line-height: 1.65;
}

.docs-feature-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #60a5fa;
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.3s, transform 0.3s, color 0.3s;
}

.docs-feature-card:hover .docs-feature-link {
    opacity: 1;
    transform: translateX(0);
}

.docs-feature-link i {
    font-size: 0.9rem;
    transition: transform 0.3s;
}

.docs-feature-card:hover .docs-feature-link i {
    transform: translateX(4px);
}

/* ── Steps ── */
.docs-steps { display: grid; gap: 16px; }

.docs-step {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 16px;
    row-gap: 10px;
    align-items: start;
    background: rgba(17,24,39,0.5);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 24px;
    transition: transform 0.35s, border-color 0.35s, box-shadow 0.35s, background 0.35s;
}

.docs-step:hover {
    transform: translateX(8px);
    border-color: rgba(96,165,250,0.25);
    background: rgba(17,24,39,0.8);
    box-shadow: -8px 0 32px rgba(59,130,246,0.08);
}

.docs-step > div {
    display: contents;
}

.docs-step-num {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 0.95rem;
    box-shadow: 0 4px 16px rgba(37,99,235,0.35);
    transition: transform 0.35s, box-shadow 0.35s;
}

.docs-step:hover .docs-step-num {
    transform: scale(1.08);
    box-shadow: 0 8px 24px rgba(37,99,235,0.45);
}

.docs-step h4 {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    margin: 0;
    font-size: 1.22rem;
    color: #fff;
    font-weight: 700;
    line-height: 1.3;
}

.docs-step > div > *:not(h4) {
    grid-column: 1 / -1;
}

.docs-step p {
    margin: 0;
    color: var(--hub-muted);
    font-size: 0.92rem;
    line-height: 1.65;
    text-align: justify;
    text-align-last: left;
}

/* ── FAQ accordion ── */
.docs-faq {
    display: grid;
    gap: 10px;
}

.docs-faq-item {
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: 12px;
}

.docs-faq-item[open] {
    border-color: rgba(59,130,246,0.35);
}

.docs-faq-q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.docs-faq-q::-webkit-details-marker,
.docs-faq-q::marker {
    display: none;
    content: "";
}

.docs-faq-title {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--hub-text);
    line-height: 1.4;
}

.docs-faq-chevron {
    width: 1.1rem !important;
    height: 1.1rem !important;
    color: var(--hub-muted);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.docs-faq-item[open] .docs-faq-chevron {
    transform: rotate(180deg);
    color: var(--hub-primary);
}

.docs-faq-a {
    padding: 0 18px 16px;
    border-top: 1px solid var(--hub-border);
    margin-top: 0;
    padding-top: 14px;
}

.docs-faq-a p {
    margin: 0;
    color: var(--hub-muted);
    font-size: 0.9rem;
    line-height: 1.65;
    text-align: justify;
    text-align-last: left;
    hyphens: auto;
}

.docs-faq-a a {
    color: #93c5fd;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.docs-faq-a code {
    font-size: 0.85em;
    padding: 0.1em 0.4em;
    border-radius: 4px;
    background: var(--hub-code-bg);
    border: 1px solid var(--hub-border);
    color: var(--hub-text);
}

@media (max-width: 640px) {
    .docs-faq-q {
        padding: 14px 16px;
    }

    .docs-faq-a {
        padding: 12px 16px 14px;
    }

    .docs-faq-title {
        font-size: 0.92rem;
    }
}

/* ── Code & tables ── */
.docs-code-block {
    background: var(--hub-code-bg);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 16px;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.docs-code-block:hover {
    border-color: rgba(96,165,250,0.2);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.docs-code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 0.8rem;
    color: var(--hub-muted);
    font-weight: 500;
}

.docs-code-block pre {
    margin: 0;
    padding: 22px;
    overflow-x: auto;
    max-width: 100%;
    font-size: 0.82rem;
    line-height: 1.6;
    color: #cbd5e1;
}

.docs-code-block code { font-family: "JetBrains Mono", Consolas, monospace; }

.docs-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    width: 100%;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    margin-bottom: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.docs-table-wrap:hover {
    border-color: rgba(96,165,250,0.15);
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.docs-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.docs-table th, .docs-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    white-space: nowrap;
}
.docs-table th {
    background: rgba(255,255,255,0.03);
    color: var(--hub-muted);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.docs-table tbody tr { transition: background 0.25s; }
.docs-table tbody tr:hover { background: rgba(59,130,246,0.06); }
.docs-table tr:last-child td { border-bottom: 0; }
.docs-table code {
    background: rgba(59,130,246,0.15);
    color: #93c5fd;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.85em;
}

.docs-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 20px;
}

.docs-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ── CTA ── */
.docs-cta {
    margin-top: 40px;
    padding: 0;
}

.docs-cta-inner {
    text-align: center;
    padding: 64px 40px;
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(37,99,235,0.15) 0%, rgba(139,92,246,0.12) 50%, rgba(37,99,235,0.08) 100%);
    border: 1px solid rgba(96,165,250,0.2);
    position: relative;
    overflow: hidden;
}

.docs-cta-inner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 80% at 50% 120%, rgba(59,130,246,0.2), transparent);
    pointer-events: none;
}

.docs-cta-inner h2 {
    margin: 0 0 12px;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    color: #fff;
    border: 0;
    position: relative;
}

.docs-cta-inner p {
    margin: 0 0 32px;
    color: var(--hub-muted);
    font-size: 1.05rem;
    position: relative;
}

.docs-cta-inner .docs-hero-actions {
    justify-content: center;
    margin-bottom: 0;
    position: relative;
}

.docs-footer {
    text-align: center;
    padding: 48px 28px;
    color: var(--hub-muted);
    font-size: 0.85rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    position: relative;
    z-index: 1;
    background: rgba(11,18,32,0.5);
    backdrop-filter: blur(12px);
}

.docs-alert { padding: 16px 20px; border-radius: 10px; margin-bottom: 16px; font-size: 0.9rem; }
.docs-alert-info { background: rgba(59,130,246,0.12); border: 1px solid rgba(59,130,246,0.25); color: #93c5fd; }
.docs-alert-warn { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.25); color: #fcd34d; }
.docs-endpoint { display: inline-flex; align-items: center; gap: 10px; background: var(--hub-surface); border: 1px solid var(--hub-border); border-radius: 10px; padding: 12px 18px; font-family: Consolas, monospace; font-size: 0.95rem; margin-bottom: 20px; flex-wrap: wrap; max-width: 100%; overflow-wrap: anywhere; }
.docs-method { background: #166534; color: #86efac; padding: 4px 10px; border-radius: 6px; font-weight: 700; font-size: 0.75rem; }

@media (max-width: 992px) {
    .docs-hero-inner {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .docs-hero-copy { max-width: none; }

    .docs-hero-actions,
    .docs-story-closing .docs-hero-actions,
    .docs-cta-inner .docs-hero-actions {
        justify-content: center;
    }

    .docs-hero-stats {
        justify-content: center;
        flex-wrap: wrap;
    }

    .docs-hero-visual {
        order: -1;
        max-width: min(480px, 100%);
        margin: 0 auto;
        padding: 16px 8px 12px;
    }

    .docs-mockup { transform: none; }
    .docs-mockup:hover { transform: translateY(-4px); }

    .docs-mockup-glow { inset: -5%; }

    .docs-mockup-metrics {
        grid-template-columns: repeat(3, 1fr);
    }

    .docs-float-card-1 { right: 8px; top: 8px; }
    .docs-float-card-2 { left: 8px; bottom: 12px; }

    .docs-grid-2,
    .docs-grid-3 { grid-template-columns: 1fr; }

    .docs-story-grid { grid-template-columns: 1fr; }

    .docs-orb-1 { width: 260px; height: 260px; left: -40px; top: -60px; }
    .docs-orb-2 { width: 220px; height: 220px; right: -40px; }
    .docs-orb-3 { width: 180px; height: 180px; left: 15%; }

    .docs-cta-inner { padding: 48px 24px; }

    .docs-section { overflow-x: visible; }
}

@media (max-width: 576px) {
    .docs-container { padding: 0 16px 60px; }
    .docs-nav-inner { padding: 14px 16px; gap: 12px; }
    .docs-hero { padding: 32px 0 56px; }
    .docs-hero-stats { gap: 16px; padding: 16px; }
    .docs-stat-divider { display: none; }
    .docs-stat { flex: 1; min-width: 0; text-align: center; }
    .docs-float-card { display: none; }
    .docs-endpoint { width: 100%; box-sizing: border-box; }
    .docs-hero-copy h1 { font-size: clamp(1.75rem, 8vw, 2.5rem); }
    .docs-orb { display: none; }
    .docs-story-lead { padding: 20px 16px; }
    .docs-story-card { padding: 20px 16px; }
    .docs-cta-inner { padding: 40px 16px; }
    .docs-code-block { max-width: 100%; }
    .docs-footer { padding-left: 16px; padding-right: 16px; box-sizing: border-box; }
    .hub-nav-inner { padding: 14px 16px; }
    .hub-nav .hub-btn-sm { padding: 8px 12px; font-size: 0.82rem; }
    .login-card { padding: 24px 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .docs-orb,
    .docs-float-card,
    .docs-badge-dot,
    .docs-btn-glow {
        animation: none;
    }

    .docs-mockup,
    .docs-story-card,
    .docs-feature-card,
    .docs-step,
    .docs-btn {
        transition: none;
    }
}

/* ── Admin layout ── */
.admin-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    width: 100%;
}

.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    height: 100dvh;
    background: rgba(17,24,39,0.95);
    border-right: 1px solid var(--hub-border);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    backdrop-filter: blur(12px);
    overflow: hidden;
    z-index: 60;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 28px;
    padding: 0 8px;
    color: #fff;
    text-decoration: none;
}

.sidebar-brand i { font-size: 1.3rem; color: #60a5fa; }

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav .nav-link {
    color: var(--hub-muted);
    text-decoration: none;
    padding: 11px 14px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.sidebar-nav .nav-link svg.lucide {
    width: 1.1rem;
    height: 1.1rem;
    stroke: currentColor;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background: rgba(59,130,246,0.15);
    color: #fff;
}

.sidebar-logout-form {
    margin: 0;
}

.sidebar-logout-btn {
    width: 100%;
    border: none;
    background: transparent;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.sidebar-logout-btn:hover {
    background: rgba(248,113,113,0.12);
    color: #fca5a5;
}

.admin-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin-left: var(--sidebar-width);
    width: auto;
    min-height: 100vh;
}

.admin-topbar {
    background: rgba(11,18,32,0.92);
    border-bottom: 1px solid var(--hub-border);
    padding: 18px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    backdrop-filter: blur(12px);
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    z-index: 50;
    min-height: var(--admin-topbar-height);
    box-sizing: border-box;
}

.page-title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
}

.user-badge {
    color: var(--hub-muted);
    font-size: 0.9rem;
}

.sidebar-user-badge {
    display: none;
}

.admin-content {
    padding: 28px 32px 40px;
    padding-top: calc(var(--admin-topbar-height) + 28px);
    width: 100%;
    max-width: none;
    flex: 1;
    box-sizing: border-box;
}

/* ── Admin components (aliases) ── */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
    width: 100%;
}

.metric-card, .panel-card, .hub-card-panel {
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: 14px;
    overflow: hidden;
    width: 100%;
}

.metric-card { padding: 22px; }

.metric-card .label {
    color: var(--hub-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.metric-card .value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

.metric-card .value.text-primary { color: #60a5fa !important; }
.metric-card .value.text-success { color: var(--hub-success) !important; }
.metric-card .sub { margin-top: 8px; color: var(--hub-muted); font-size: 0.88rem; }

.panel-card .card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--hub-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.panel-card .card-header h5 { margin: 0; color: #fff; font-size: 1rem; }
.panel-card .card-body { padding: 0; }
.panel-card .card-body.p-4,
.panel-card .card-body:not(:empty) {
    width: 100%;
}

.hub-body .table-responsive {
    width: 100%;
}

.badge-success-custom {
    background: rgba(52,211,153,0.15);
    color: #6ee7b7;
    border: 1px solid rgba(52,211,153,0.25);
}

.badge-danger-custom {
    background: rgba(248,113,113,0.15);
    color: #fca5a5;
    border: 1px solid rgba(248,113,113,0.25);
}

.api-key {
    font-family: Consolas, monospace;
    font-size: 0.82rem;
    word-break: break-all;
    color: #93c5fd;
}

.message-preview {
    max-width: 320px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--hub-muted);
}

/* ── Bootstrap overrides (dark) ── */
.hub-body .form-control,
.hub-body .form-select {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--hub-border);
    color: var(--hub-text);
    border-radius: 10px;
    padding: 10px 14px;
}

.hub-body .form-control:focus,
.hub-body .form-select:focus {
    background: rgba(255,255,255,0.06);
    border-color: #3b82f6;
    color: #fff;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

.hub-body .form-control::placeholder { color: #64748b; }
.hub-body .form-label { color: #cbd5e1; font-weight: 600; font-size: 0.9rem; }
.hub-body .form-check-label { color: var(--hub-muted); }
.hub-body .form-check-input { background-color: rgba(255,255,255,0.06); border-color: var(--hub-border); }
.hub-body .form-check-input:checked { background-color: #3b82f6; border-color: #3b82f6; }
.hub-body .text-danger { color: var(--hub-danger) !important; }
.hub-body .text-muted { color: var(--hub-muted) !important; }

.hub-body .table {
    color: var(--hub-text);
    --bs-table-bg: transparent;
    --bs-table-color: var(--hub-text);
    --bs-table-striped-color: var(--hub-text);
    --bs-table-hover-color: var(--hub-text);
}
.hub-body .table thead th {
    background: rgba(255,255,255,0.03);
    color: var(--hub-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--hub-border);
}
.hub-body .table td, .hub-body .table th {
    border-bottom: 1px solid var(--hub-border);
    vertical-align: middle;
    padding: 14px 16px;
}
.hub-body .table-hover tbody tr:hover { background: rgba(59,130,246,0.06); }

.hub-body .btn-primary {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(37,99,235,0.3);
}
.hub-body .btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #6d28d9);
    border: none;
}

.hub-body .btn-outline-primary {
    border: 1px solid rgba(59,130,246,0.4);
    color: #93c5fd;
    border-radius: 10px;
}
.hub-body .btn-outline-primary:hover {
    background: rgba(59,130,246,0.12);
    color: #bfdbfe;
    border-color: rgba(59,130,246,0.5);
}

.hub-body .btn-outline-secondary {
    border: 1px solid var(--hub-border);
    color: var(--hub-muted);
    border-radius: 10px;
}
.hub-body .btn-outline-secondary:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
    border-color: rgba(255,255,255,0.15);
}

.hub-body .btn-outline-danger {
    border: 1px solid rgba(248,113,113,0.35);
    color: var(--hub-danger);
    border-radius: 10px;
}
.hub-body .btn-outline-danger:hover {
    background: rgba(248,113,113,0.1);
    color: #fca5a5;
}

.hub-body .alert-success { background: rgba(52,211,153,0.12); border-color: rgba(52,211,153,0.25); color: #6ee7b7; }
.hub-body .alert-danger { background: rgba(248,113,113,0.12); border-color: rgba(248,113,113,0.25); color: #fca5a5; }

/* ── Login ── */
.login-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: 16px;
    padding: 36px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-card h2 { margin-bottom: 8px; font-weight: 700; color: #fff; }
.login-card p { color: var(--hub-muted); margin-bottom: 24px; }

/* ── Guide (admin rehber) ── */
.guide-section { margin-bottom: 1.5rem; }
.guide-section .card-header {
    justify-content: flex-start;
    gap: 12px;
    text-align: left;
}
.guide-section .card-header h5 {
    text-align: left;
}
.guide-section,
.guide-intro {
    color: var(--hub-text);
    padding: 1.5rem;
}
.guide-section .card-header {
    margin: -1.5rem -1.5rem 1.5rem;
}
.guide-section p,
.guide-section li,
.guide-section ol,
.guide-section td,
.guide-section th,
.guide-intro p {
    color: var(--hub-text);
}
.guide-section strong,
.guide-intro strong {
    color: #fff;
}
.guide-section a,
.guide-intro a {
    color: #93c5fd;
    text-decoration: none;
}
.guide-section a:hover,
.guide-intro a:hover {
    color: #bfdbfe;
    text-decoration: underline;
}
.guide-note {
    color: #cbd5e1 !important;
}
.guide-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.guide-code {
    background: var(--hub-code-bg);
    color: #e2e8f0;
    border: 1px solid var(--hub-border);
    border-radius: 10px;
    padding: 16px;
    font-size: 0.82rem;
    line-height: 1.5;
    overflow-x: auto;
    margin-bottom: 16px;
}
.guide-list { padding-left: 1.2rem; color: var(--hub-text); }
.guide-list li { margin-bottom: 8px; }
.guide-table th { width: 140px; color: #cbd5e1; font-weight: 600; }
.guide-table td { color: var(--hub-text); }
.guide-table thead th { color: #93c5fd; }
.guide-checklist { display: flex; flex-direction: column; gap: 12px; }
.guide-check-item { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; color: var(--hub-text); }
.guide-check-item i { color: #93c5fd; }
.guide-check-item i.text-success { color: var(--hub-success) !important; }
.guide-intro {
    background: linear-gradient(135deg, rgba(59,130,246,0.08), rgba(139,92,246,0.06));
    border: 1px solid var(--hub-border);
}

.hub-body .w-100 { width: 100%; }
.hub-btn.w-100 { width: 100%; justify-content: center; }

@media (max-width: 992px) {
    .mobile-menu-toggle {
        display: inline-flex;
        z-index: 210;
    }

    .mobile-menu-backdrop,
    .admin-sidebar-backdrop {
        display: block;
    }

    .docs-nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: min(300px, 88vw);
        height: 100vh;
        height: 100dvh;
        flex: none;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        padding: 20px 20px 24px;
        background: rgba(11,18,32,0.98);
        border-left: 1px solid var(--hub-border);
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 200;
        overflow-y: auto;
        box-shadow: -8px 0 32px rgba(0,0,0,0.35);
    }

    .docs-nav-menu.is-open {
        transform: translateX(0);
    }

    .mobile-menu-header {
        display: block;
        margin-bottom: 16px;
        padding-bottom: 16px;
        border-bottom: 1px solid var(--hub-border);
    }

    .docs-nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        flex: none;
        justify-content: flex-start;
    }

    .docs-nav-links a {
        white-space: normal;
        padding: 12px 14px;
    }

    .docs-nav .docs-hero-actions,
    .docs-nav-actions {
        flex-direction: column;
        width: 100%;
        margin-top: 16px !important;
        padding-top: 16px;
        border-top: 1px solid var(--hub-border);
    }

    .docs-nav .docs-btn {
        width: 100%;
        justify-content: center;
    }

    .hub-hero { padding-top: 48px; }
    .docs-hero { padding-top: 24px; }

    .admin-wrapper {
        min-height: 100vh;
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(280px, 88vw);
        height: auto;
        z-index: 200;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        border-right: 1px solid var(--hub-border);
        border-bottom: 0;
        overflow-y: auto;
    }

    .admin-sidebar.is-open {
        transform: translateX(0);
    }

    .sidebar-nav {
        flex-direction: column;
        overflow-x: visible;
        overflow-y: auto;
        min-height: 0;
    }

    .admin-topbar {
        left: 0;
        padding: 14px 16px;
        gap: 12px;
        min-height: 56px;
    }

    .page-title {
        font-size: 1.1rem;
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .topbar-user-badge {
        display: none;
    }

    .sidebar-user-badge {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        margin: 0 8px 18px;
        max-width: calc(100% - 16px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .admin-content {
        padding: 20px 16px 32px;
        padding-top: calc(56px + 20px);
    }
}
