/* ═══ Docs — layout full bleed ═══ */
.mu-wrap--docs {
    grid-template-columns: minmax(0, 1fr);
    max-width: none;
}

.mu-wrap--docs .mu-sidebar {
    display: none;
}

.mu-main--docs {
    max-width: none;
    min-width: 0;
    width: 100%;
    padding-left: clamp(0.5rem, 1.5vw, 1.5rem);
    padding-right: clamp(0.5rem, 1.5vw, 1.5rem);
}

.mu-wrap--docs .mu-main--docs {
    grid-column: 1 / -1;
}

.mu-doc {
    position: relative;
    isolation: isolate;
    padding-bottom: 3rem;
    min-height: calc(100vh - 8rem);
}

.mu-doc__ambient {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.mu-doc__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.35;
    animation: mu-doc-orb 22s ease-in-out infinite alternate;
}

.mu-doc__orb--a {
    width: 50vw;
    height: 50vw;
    top: -10%;
    left: -5%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.4), transparent 65%);
}

.mu-doc__orb--b {
    width: 45vw;
    height: 45vw;
    top: 15%;
    right: -5%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.28), transparent 65%);
    animation-delay: -8s;
}

.mu-doc__orb--c {
    width: 40vw;
    height: 40vw;
    bottom: -5%;
    left: 25%;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.18), transparent 65%);
    animation-delay: -14s;
}

.mu-doc__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    mask-image: radial-gradient(ellipse 70% 55% at 40% 25%, #000 15%, transparent 70%);
    opacity: 0.4;
}

@keyframes mu-doc-orb {
    from { transform: translate(0, 0) scale(1); opacity: 0.35; }
    to { transform: translate(2%, 3%) scale(1.05); opacity: 0.45; }
}

/* ═══ Hero compact ═══ */
.mu-doc__hero {
    margin-bottom: 1.25rem;
}

.mu-doc__hero-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(8, 14, 28, 0.55);
    backdrop-filter: blur(16px);
}

.mu-doc__eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #7ec8ff;
}

.mu-doc__title {
    margin: 0 0 0.35rem;
    font-family: var(--mu-font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    line-height: 1.1;
    background: linear-gradient(120deg, #fff 0%, #b8dcff 55%, #8eb8ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.mu-doc__lead {
    margin: 0;
    max-width: 48ch;
    font-size: 0.9rem;
    color: var(--mu-text-secondary);
    line-height: 1.55;
}

.mu-doc__hero-tip {
    margin: 0.65rem 0 0;
    font-size: 0.82rem;
    color: rgba(200, 220, 255, 0.82);
}

.mu-doc__hero-link {
    color: #9ec8ff;
    text-decoration: none;
    border-bottom: 1px solid rgba(158, 200, 255, 0.35);
}

.mu-doc__hero-link:hover {
    color: #d4e8ff;
}

.mu-doc__hero-stats {
    display: flex;
    gap: 0.5rem;
}

.mu-doc__stat {
    min-width: 4.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.35);
    text-align: center;
}

.mu-doc__stat strong {
    display: block;
    font-family: var(--mu-font-display);
    font-size: 1.2rem;
    color: #fff;
}

.mu-doc__stat span {
    font-size: 0.68rem;
    color: var(--mu-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ═══ Shell: dock + stage ═══ */
.mu-doc__shell {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: clamp(1rem, 1.5vw, 2rem);
    align-items: start;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Dock — glass rail, no solid box */
.mu-doc__dock {
    position: sticky;
    top: 5.5rem;
    z-index: 5;
    align-self: start;
}

.mu-doc__dock-glass,
.mu-doc__dock-rail {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.35rem;
    border-radius: 18px;
    background: rgba(6, 10, 20, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    max-height: calc(100vh - 7rem);
    min-width: 0;
}

.mu-doc__dock-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.35rem 0.15rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mu-doc__dock-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(180, 210, 255, 0.85);
}

.mu-doc__dock-count {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.45);
}

.mu-doc__search {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.65rem;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: border-color 0.2s, background 0.2s;
}

.mu-doc__search:focus-within {
    border-color: rgba(126, 184, 232, 0.35);
    background: rgba(0, 0, 0, 0.55);
}

.mu-doc__search svg {
    flex-shrink: 0;
    opacity: 0.5;
    color: rgba(180, 210, 255, 0.7);
}

.mu-doc__search input {
    flex: 1;
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 0.85rem;
    outline: none;
    min-width: 0;
}

.mu-doc__search input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

/* Nav items — floating pills */
.mu-doc__nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.15rem 0.2rem 0.35rem 0.15rem;
    margin: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(126, 184, 232, 0.4) transparent;
}

.mu-doc__nav-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: start;
    gap: 0.55rem;
    width: 100%;
    padding: 0.55rem 0.6rem;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.mu-doc__nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(3px);
}

.mu-doc__nav-item.is-active {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(126, 184, 232, 0.35);
    box-shadow:
        inset 3px 0 0 rgba(110, 170, 255, 0.5),
        0 4px 24px rgba(37, 99, 235, 0.15);
    transform: translateX(4px);
}

.mu-doc__nav-num {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 1.65rem;
    height: 1.65rem;
    border-radius: 8px;
    font-family: var(--mu-font-display);
    font-size: 0.72rem;
    font-weight: 700;
    color: #9ec9ff;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(126, 184, 232, 0.25);
    flex-shrink: 0;
}

.mu-doc__nav-item.is-active .mu-doc__nav-num {
    color: #fff;
    background: linear-gradient(145deg, #3b82f6, #2563eb);
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.mu-doc__nav-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.mu-doc__nav-title {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.92);
}

.mu-doc__nav-excerpt {
    display: none;
    font-size: 0.68rem;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.45);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 14rem;
}

.mu-doc__nav-item:hover .mu-doc__nav-excerpt,
.mu-doc__nav-item.is-active .mu-doc__nav-excerpt {
    display: block;
}

.mu-doc__nav-chevron {
    opacity: 0;
    color: rgba(126, 184, 232, 0.6);
    font-size: 1rem;
    line-height: 1;
    transition: opacity 0.2s, transform 0.2s;
    align-self: center;
}

.mu-doc__nav-item:hover .mu-doc__nav-chevron,
.mu-doc__nav-item.is-active .mu-doc__nav-chevron {
    opacity: 1;
    transform: translateX(2px);
}

.mu-doc__nav-empty {
    margin: 0;
    padding: 1rem 0.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
}

/* Stage — content panel */
.mu-doc__stage {
    position: relative;
    min-width: 0;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 16, 28, 0.5);
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.mu-doc__progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 3;
    height: 2px;
    background: rgba(0, 0, 0, 0.5);
}

.mu-doc__progress-bar {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #22d3ee, #8b5cf6);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
    transition: width 0.12s ease-out;
}

.mu-doc__stage-panel {
    max-height: calc(100vh - 8rem);
    overflow: auto;
    overflow-x: hidden;
    padding: clamp(1.25rem, 2vw, 2.5rem);
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(126, 184, 232, 0.35) transparent;
}

.mu-doc__article-head {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mu-doc__badge {
    display: inline-block;
    margin-bottom: 0.45rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9fd0ff;
    background: rgba(59, 130, 246, 0.18);
    border: 1px solid rgba(126, 184, 232, 0.3);
}

.mu-doc__article-title {
    margin: 0;
    font-family: var(--mu-font-display);
    font-size: clamp(1.2rem, 2.2vw, 1.75rem);
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

.mu-doc__section-loading {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    color: rgba(186, 210, 255, 0.75);
}

.mu-doc__section-pane[hidden] {
    display: none !important;
}

.mu-doc__body {
    color: var(--mu-text);
    font-size: 0.95rem;
    line-height: 1.7;
}

.mu-doc__body > .mu-doc__p,
.mu-doc__body > .mu-doc__h3,
.mu-doc__body > .mu-doc__list,
.mu-doc__body > .mu-doc__hr {
    opacity: 0;
    transform: translateY(10px);
    transition:
        opacity 0.35s ease,
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.mu-doc__body > .mu-doc__figure {
    opacity: 1;
    transform: none;
}

.mu-doc__body > .is-revealed {
    opacity: 1;
    transform: none;
}

.mu-doc__p {
    margin: 0 0 1rem;
}

.mu-doc__h3 {
    margin: 1.5rem 0 0.65rem;
    font-family: var(--mu-font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: #d4e8ff;
}

.mu-doc__list {
    margin: 0 0 1rem 0 0 1.1rem 1.2rem;
    padding: 0;
}

.mu-doc__list li {
    margin-bottom: 0.35rem;
    padding-left: 0.2rem;
}

.mu-doc__list li::marker {
    color: #6eb6ff;
}

.mu-doc__hr {
    margin: 1.25rem 0;
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(126, 184, 232, 0.35), transparent 65%);
}

/* Images */
.mu-doc__figure {
    display: block;
    clear: both;
    margin: 1.75rem auto;
    padding: 0.5rem;
    max-width: min(100%, 760px);
    text-align: center;
    position: relative;
    z-index: 1;
    isolation: isolate;
}

.mu-doc__img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
    cursor: zoom-in;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: rgba(8, 12, 20, 0.5);
    vertical-align: middle;
}

.mu-doc__figure:hover .mu-doc__img {
    border-color: rgba(126, 184, 232, 0.35);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
}

.mu-doc__figure--missing {
    min-height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.25rem;
    border-radius: 14px;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.35);
}

.mu-doc__figure--missing::before {
    content: '🖼';
    font-size: 1.5rem;
    opacity: 0.4;
}

.mu-doc__figure--missing::after {
    content: 'Imagem não encontrada na pasta ITENS PARA IA';
    font-size: 0.78rem;
    color: var(--mu-text-dim);
    text-align: center;
    word-break: break-all;
    padding: 0 0.75rem;
}

.mu-doc__figure-caption {
    display: none !important;
}

/* Transitions */
.mu-doc-enter { transition: opacity 0.4s ease, transform 0.45s ease, filter 0.4s ease; }
.mu-doc-enter-start { opacity: 0; transform: translateY(20px) scale(0.98); filter: blur(4px); }
.mu-doc-enter-end { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
.mu-doc-leave { transition: opacity 0.25s ease, transform 0.3s ease, filter 0.25s ease; }
.mu-doc-leave-start { opacity: 1; transform: translateY(0); filter: blur(0); }
.mu-doc-leave-end { opacity: 0; transform: translateY(-12px); filter: blur(2px); }

/* Lightbox */
.mu-doc-lightbox {
    position: fixed;
    inset: 0;
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(4, 8, 18, 0.88);
    backdrop-filter: blur(10px);
}

.mu-doc-lightbox__frame {
    position: relative;
    max-width: min(94vw, 1100px);
    max-height: 90vh;
    padding: 0.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.mu-doc-lightbox__close {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.9);
    color: #fff;
    font-size: 1.35rem;
    cursor: pointer;
    z-index: 2;
    transition: background 0.2s, transform 0.15s;
}

.mu-doc-lightbox__frame img {
    display: block;
    max-width: 100%;
    max-height: 86vh;
    border-radius: 12px;
    object-fit: contain;
}

.mu-doc__empty {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--mu-text-secondary);
}

@media (max-width: 1024px) {
    .mu-doc__shell {
        grid-template-columns: 1fr;
    }

    .mu-doc__dock {
        position: relative;
        top: auto;
        max-height: none;
    }

    .mu-doc__dock-glass,
    .mu-doc__dock-rail {
        max-height: min(50vh, 420px);
    }
}

@media (max-width: 640px) {
    .mu-doc__nav-excerpt {
        display: none !important;
    }
}