/* BlogNexa public user guide */
:root {
    --g-bg: #0b1220;
    --g-sidebar: #111827;
    --g-panel: #ffffff;
    --g-text: #334155;
    --g-heading: #0f172a;
    --g-muted: #64748b;
    --g-primary: #6366f1;
    --g-primary-dark: #4f46e5;
    --g-border: #e2e8f0;
    --g-radius: 16px;
    --g-shadow: 0 20px 50px rgba(15, 23, 42, .12);
}

* { box-sizing: border-box; }
body.guide-body { margin: 0; font-family: "Plus Jakarta Sans", system-ui, sans-serif; background: #f1f5f9; color: var(--g-text); }

.guide-topbar { background: linear-gradient(135deg, #0f172a, #1e293b); border-bottom: 1px solid rgba(255,255,255,.06); position: sticky; top: 0; z-index: 50; }
.guide-topbar-inner { max-width: 1280px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.guide-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.guide-brand-tag { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #a5b4fc; background: rgba(99,102,241,.15); padding: 4px 10px; border-radius: 999px; }
.guide-topbar-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.guide-btn { display: inline-flex; align-items: center; padding: 9px 16px; border-radius: 10px; font-size: 13px; font-weight: 600; text-decoration: none; border: 1px solid transparent; transition: .15s; }
.guide-btn-ghost { color: #e2e8f0; border-color: rgba(255,255,255,.15); }
.guide-btn-ghost:hover { background: rgba(255,255,255,.06); color: #fff; }
.guide-btn-primary { background: linear-gradient(135deg, var(--g-primary), #8b5cf6); color: #fff; box-shadow: 0 8px 20px rgba(99,102,241,.35); }
.guide-btn-primary:hover { filter: brightness(1.05); color: #fff; }

.guide-shell { max-width: 1280px; margin: 0 auto; padding: 24px; display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
.guide-sidebar { background: var(--g-sidebar); color: #cbd5e1; border-radius: var(--g-radius); padding: 16px; position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow: auto; box-shadow: var(--g-shadow); }
.guide-sidebar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
.guide-sidebar-head strong { color: #f8fafc; font-size: 14px; }
.guide-sidebar-close { display: none; background: none; border: none; color: #94a3b8; font-size: 24px; cursor: pointer; }
.guide-nav-section { margin-bottom: 16px; }
.guide-nav-label { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #64748b; margin: 0 0 8px 8px; }
.guide-nav-link { display: block; padding: 8px 12px; border-radius: 10px; color: #cbd5e1; text-decoration: none; font-size: 13px; font-weight: 500; margin-bottom: 2px; border-left: 3px solid transparent; }
.guide-nav-link:hover { background: rgba(255,255,255,.05); color: #fff; }
.guide-nav-link--top { font-weight: 600; }
.guide-nav-module { margin-bottom: 4px; }
.guide-nav-module-head { display: flex; align-items: center; gap: 4px; }
.guide-nav-module-title { flex: 1; display: block; padding: 8px 12px; border-radius: 10px; color: #e2e8f0; text-decoration: none; font-size: 13px; font-weight: 700; }
.guide-nav-module-title:hover { background: rgba(255,255,255,.05); color: #fff; }
.guide-nav-module-title.is-active { background: rgba(99,102,241,.18); color: #fff; }
.guide-nav-toggle { background: none; border: none; color: #64748b; cursor: pointer; padding: 4px 8px; font-size: 12px; transition: transform .2s; }
.guide-nav-module.is-open .guide-nav-toggle { transform: rotate(180deg); }
.guide-nav-children { max-height: 0; overflow: hidden; transition: max-height .25s ease; padding-left: 8px; }
.guide-nav-module.is-open .guide-nav-children { max-height: 800px; }
.guide-nav-link--child { font-size: 12px; padding-left: 20px; }
.guide-nav-link.is-active { background: rgba(99,102,241,.18); color: #fff; border-left-color: #818cf8; font-weight: 600; }

.guide-main { background: var(--g-panel); border-radius: var(--g-radius); box-shadow: var(--g-shadow); padding: 32px 36px; min-width: 0; }
.guide-mobile-toggle { display: none; margin-bottom: 16px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--g-border); background: #fff; font-weight: 600; cursor: pointer; }
.guide-page-head { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--g-border); }
.guide-kicker { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--g-primary); }
.guide-page-head h1 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--g-heading); line-height: 1.2; }

/* Prose / content components */
.prose .lead { font-size: 1.1rem; color: #475569; line-height: 1.7; margin-bottom: 24px; }
.prose h2 { margin: 36px 0 12px; font-size: 1.35rem; color: var(--g-heading); scroll-margin-top: 100px; }
.prose h3 { margin: 24px 0 8px; font-size: 1.05rem; color: var(--g-heading); }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--g-primary-dark); font-weight: 600; text-decoration: none; }
.prose a:hover { text-decoration: underline; }
.prose code { background: #f1f5f9; padding: 2px 7px; border-radius: 6px; font-size: 13px; }

.g-card { border: 1px solid var(--g-border); border-radius: 14px; padding: 18px 20px; margin: 16px 0; background: #fafbff; }
.g-card h3 { margin-top: 0; }
.g-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 20px 0; }
.g-tile { border: 1px solid var(--g-border); border-radius: 14px; padding: 16px; background: #fff; transition: .15s; }
.g-tile:hover { border-color: #c7d2fe; box-shadow: 0 8px 24px rgba(99,102,241,.08); }
.g-tile strong { display: block; margin-bottom: 6px; color: var(--g-heading); }
.g-tile span { font-size: 13px; color: var(--g-muted); }

.g-table-wrap { overflow-x: auto; margin: 18px 0 24px; border: 1px solid var(--g-border); border-radius: 12px; }
.g-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.g-table th, .g-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--g-border); vertical-align: top; }
.g-table th { background: #f8fafc; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--g-muted); }
.g-table tr:last-child td { border-bottom: none; }
.g-table code { font-size: 12px; }

.g-flow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0; }
.g-flow-step { background: linear-gradient(135deg, #eef2ff, #f5f3ff); border: 1px solid #c7d2fe; padding: 8px 12px; border-radius: 10px; font-size: 12px; font-weight: 600; color: #4338ca; }
.g-flow-arrow { color: #94a3b8; font-weight: 700; }

.g-callout { border-left: 4px solid var(--g-primary); background: #eef2ff; padding: 14px 16px; border-radius: 0 12px 12px 0; margin: 18px 0; }
.g-callout-warn { border-left-color: #f59e0b; background: #fffbeb; }
.g-callout-ok { border-left-color: #10b981; background: #ecfdf5; }

.g-diagram { background: #0f172a; color: #e2e8f0; padding: 18px; border-radius: 12px; font-family: ui-monospace, monospace; font-size: 12px; line-height: 1.5; overflow-x: auto; margin: 16px 0; white-space: pre; }

.g-badge { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.g-badge-live { background: #dcfce7; color: #166534; }
.g-badge-soon { background: #fef3c7; color: #92400e; }

.guide-footer { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--g-border); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.guide-footer p { margin: 0; font-size: 13px; color: var(--g-muted); }
.brand-softnexa-link { color: var(--g-primary); font-weight: 600; text-decoration: none; }
.brand-softnexa-link:hover { text-decoration: underline; color: var(--g-primary-dark); }

.guide-lang { position: relative; }
.guide-lang-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.15);
    background: rgba(255,255,255,.06); color: #e2e8f0; font-size: 13px; font-weight: 600; cursor: pointer;
}
.guide-lang-btn:hover { background: rgba(255,255,255,.1); }
.guide-lang-flag { font-size: 11px; font-weight: 800; opacity: .85; min-width: 18px; }
.guide-lang-caret { font-size: 10px; opacity: .7; }
.guide-lang-menu {
    position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; margin: 0; padding: 8px;
    list-style: none; background: #fff; border: 1px solid var(--g-border); border-radius: 12px;
    box-shadow: var(--g-shadow); z-index: 100;
}
.guide-lang-menu[hidden] { display: none; }
.guide-lang-option {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
    color: var(--g-heading); text-decoration: none; font-size: 13px; font-weight: 600;
}
.guide-lang-option:hover { background: #f1f5f9; }
.guide-lang-option.is-active { background: #eef2ff; color: var(--g-primary-dark); }
.guide-lang-current { margin-left: auto; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--g-muted); }

html[dir="rtl"] .guide-lang-menu { right: auto; left: 0; }
html[dir="rtl"] .guide-shell { direction: rtl; }
html[dir="rtl"] .guide-nav-module-title,
html[dir="rtl"] .guide-nav-link { text-align: right; }

@media (max-width: 960px) {
    .guide-shell { grid-template-columns: 1fr; padding: 16px; }
    .guide-sidebar { position: fixed; inset: 0 auto 0 0; width: min(300px, 88vw); z-index: 60; transform: translateX(-105%); transition: .2s; top: 0; max-height: none; border-radius: 0; }
    .guide-sidebar.is-open { transform: translateX(0); }
    .guide-sidebar-close { display: block; }
    .guide-mobile-toggle { display: inline-flex; }
    .guide-main { padding: 24px 20px; }
    .guide-topbar-inner { padding: 12px 16px; }
    .guide-brand-tag { display: none; }
}
