/* Ajuda (documentação simples) */

/* FAQ simples: rolagem normal da página */
html,
body {
    height: auto;
    overflow: auto;
}

body.help-page {
    min-height: 100vh;
}

/* Tokens locais */
.help-page {
    --help-surface: rgba(17, 24, 39, 0.68);
    --help-surface-2: rgba(17, 24, 39, 0.55);
    --help-border: rgba(255, 255, 255, 0.08);
    --help-border-soft: rgba(255, 255, 255, 0.06);
    --help-text: #e5e7eb;
    --help-muted: #94a3b8;
    --help-soft: #cbd5e1;
}

.help-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 18px;
}

.help-header {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 14px;
    border: 1px solid var(--help-border);
    border-radius: 14px;
    background: var(--help-surface);
    backdrop-filter: blur(10px);
}

.help-header-left{
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1 1 520px;
    min-width: 280px;
}

.help-header-right{
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
    flex: 0 1 440px;
    min-width: 260px;
}

.help-back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--help-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--help-text);
    text-decoration: none;
    font-weight: 800;
}

.help-back:hover {
    border-color: rgba(245, 194, 65, 0.45);
    box-shadow: 0 0 0 1px rgba(245, 194, 65, 0.25);
}

.help-title h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    margin: 0;
}

.help-logo{
    width: 28px;
    height: 28px;
    border-radius: 8px;
    box-shadow: 0 0 0 1px rgba(245, 194, 65, 0.15);
}

.help-title p {
    margin: 4px 0 0;
    color: var(--help-muted);
    font-size: 13px;
}

.help-search{
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(440px, 100%);
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--help-border);
    background: rgba(255, 255, 255, 0.04);
}

.help-search i{
    color: var(--help-muted);
}

.help-search input{
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: var(--help-text);
    font-size: 14px;
}

.help-clear{
    border: none;
    background: transparent;
    color: var(--help-muted);
    font-size: 18px;
    line-height: 1;
    padding: 0 4px;
    cursor: pointer;
}

.help-clear:hover{ color: var(--help-text); }

.help-chips{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.help-chip{
    text-decoration: none;
    font-weight: 900;
    font-size: 12px;
    letter-spacing: .2px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid var(--help-border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--help-soft);
}

.help-chip:hover{
    border-color: var(--brand-gold-border);
    color: var(--brand-gold);
}

.help-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 16px;
    margin-top: 16px;
}

.help-nav {
    border: 1px solid var(--help-border);
    border-radius: 14px;
    background: var(--help-surface-2);
    padding: 14px;
    position: sticky;
    top: 12px;
    align-self: start;
    max-height: none;
    overflow: visible;
}

/* ===== Menu (árvore com submenus) ===== */
.help-nav-tree{
    display: grid;
    gap: 10px;
}

.help-nav-home{
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--help-border);
    background: rgba(255, 255, 255, 0.03);
    text-decoration: none;
    font-weight: 900;
    color: var(--help-text);
}

.help-nav-home i{ color: var(--brand-gold); }

.help-nav-home:hover{
    border-color: var(--brand-gold-border);
}

.help-nav-group{
    border-radius: 14px;
    border: 1px solid var(--help-border);
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.help-nav-group summary{
    list-style: none;
    cursor: pointer;
    display: grid;
    grid-template-columns: 18px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 12px;
    font-weight: 900;
    color: var(--help-text);
}

.help-nav-group summary::-webkit-details-marker{ display:none; }

.help-nav-group summary i{ color: var(--brand-gold); }

.help-nav-open{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid var(--help-border);
    background: transparent;
    color: var(--help-muted);
    text-decoration: none;
}

.help-nav-open:hover{
    border-color: var(--brand-gold-border);
    color: var(--brand-gold);
    background: rgba(245, 194, 65, 0.06);
}

.help-nav-sub{
    display: grid;
    gap: 6px;
    padding: 0 12px 12px;
}

.help-nav-sub a{
    display: block;
    text-decoration: none;
    padding: 9px 10px;
    border-radius: 12px;
    font-weight: 700;
    color: var(--help-soft);
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.02);
}

.help-nav-sub a:hover{
    border-color: var(--help-border);
    color: var(--help-text);
}

.help-nav-sub a.is-active,
.help-nav-home.is-active{
    border-color: rgba(245, 194, 65, 0.35);
    box-shadow: 0 0 0 1px rgba(245, 194, 65, 0.18);
    color: var(--brand-gold);
}

.help-nav-group[open] summary{
    border-bottom: 1px solid var(--help-border);
    background: rgba(245, 194, 65, 0.06);
}

.help-nav-group[open] summary span{ color: var(--brand-gold); }

.help-nav-group.is-active > summary{
    background: rgba(245, 194, 65, 0.08);
}

.help-nav-title {
    font-weight: 900;
    letter-spacing: .2px;
    color: var(--help-text);
    margin-bottom: 10px;
}

.help-nav-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.help-nav-list > li {
    margin: 10px 0;
}

.help-nav-list a {
    color: var(--help-text);
    text-decoration: none;
    font-weight: 800;
}

.help-nav-list a:hover {
    color: var(--brand-gold);
}

.help-nav-list ul {
    list-style: none;
    padding-left: 12px;
    margin: 8px 0 0;
    border-left: 1px solid var(--help-border);
}

.help-nav-list ul li {
    margin: 8px 0;
}

.help-nav-list ul a {
    font-weight: 600;
    color: var(--help-soft);
}

.help-nav-list a.is-active{
    color: var(--brand-gold);
}

.help-content {
    border: 1px solid var(--help-border);
    border-radius: 14px;
    background: var(--help-surface-2);
    padding: 16px;
    font-size: 15px;
    line-height: 1.7;
    overflow: visible;
}

.faq-panel{
    display: none;
}

.faq-panel.is-active{
    display: block;
}

.faq-item{
    padding: 8px 0;
}

.help-no-results{
    border: 1px dashed var(--help-border);
    border-radius: 12px;
    padding: 12px;
    margin: 0 0 14px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--help-muted);
    font-weight: 800;
}

.help-inline-nav{
    position: sticky;
    top: 12px;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
    margin: 0 0 14px;
    border-radius: 12px;
    border: 1px solid var(--help-border);
    background: rgba(11, 15, 25, 0.55);
    backdrop-filter: blur(10px);
}

.help-inline-nav-label{
    color: var(--help-muted);
    font-weight: 900;
    margin-right: 4px;
}

.help-inline-nav a{
    text-decoration: none;
    font-weight: 900;
    font-size: 12px;
    letter-spacing: .2px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid var(--help-border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--help-soft);
}

.help-inline-nav a:hover{
    border-color: var(--brand-gold-border);
    color: var(--brand-gold);
}

.help-section {
    padding: 10px 0;
    border-bottom: 1px solid var(--help-border-soft);
}

.help-section:last-child {
    border-bottom: none;
}

.help-section h2 {
    margin: 0 0 8px;
    font-size: 20px;
    color: var(--help-text);
}

.help-section h3 {
    margin: 14px 0 8px;
    font-size: 15px;
    color: var(--help-text);
}

.help-section p {
    margin: 0 0 10px;
    color: var(--help-soft);
    line-height: 1.7;
}

.help-content a {
    color: var(--brand-gold);
}

.help-content a:hover {
    color: var(--brand-gold-hover);
}

.help-list {
    margin: 0 0 10px;
    padding-left: 18px;
    color: var(--help-soft);
    line-height: 1.7;
}

.help-note {
    border: 1px solid rgba(245, 194, 65, 0.25);
    background: rgba(245, 194, 65, 0.08);
    border-radius: 12px;
    padding: 12px;
    color: var(--help-text);
    margin-top: 10px;
}

/* Cards e painéis */
.help-cards{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.help-card{
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid var(--help-border);
    background: rgba(255, 255, 255, 0.035);
    text-decoration: none;
    color: var(--help-text);
    transition: transform 160ms var(--anim-ease-out), border-color 160ms var(--anim-ease-out);
}

.help-card:hover{
    transform: translateY(-1px);
    border-color: var(--brand-gold-border);
}

.help-card-icon{
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(245, 194, 65, 0.10);
    border: 1px solid rgba(245, 194, 65, 0.18);
    color: var(--brand-gold);
    flex: 0 0 auto;
}

.help-card-title{
    font-weight: 900;
    letter-spacing: .2px;
}

.help-card-sub{
    color: var(--help-muted);
    font-size: 12px;
    margin-top: 3px;
}

.help-card-body{ flex: 1 1 auto; }

.help-grid{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.help-panel{
    border-radius: 14px;
    border: 1px solid var(--help-border);
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
}

.help-panel-title{
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    color: var(--help-text);
    margin-bottom: 8px;
}

.help-panel-title i{ color: var(--brand-gold); }

/* Steps */
.help-steps{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.help-step{
    border-radius: 14px;
    border: 1px solid var(--help-border);
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    display: flex;
    gap: 12px;
}

.help-step-num{
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(245, 194, 65, 0.10);
    border: 1px solid rgba(245, 194, 65, 0.18);
    color: var(--brand-gold);
    font-weight: 900;
    flex: 0 0 auto;
}

.help-step-title{ font-weight: 900; color: var(--help-text); }
.help-step-text{ margin-top: 4px; color: var(--help-soft); font-size: 13px; line-height: 1.45; }

/* Plataformas */
.help-platforms{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.help-platform{
    border-radius: 14px;
    border: 1px solid var(--help-border);
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
}

.help-platform-title{
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    color: var(--help-text);
    margin-bottom: 6px;
}

.help-platform-title i{ color: var(--brand-gold); }
.help-platform-text{ color: var(--help-soft); font-size: 13px; line-height: 1.45; }

/* FAQ */
.help-faq{
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.help-faq-item{
    border-radius: 14px;
    border: 1px solid var(--help-border);
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 12px;
}

.help-faq-item summary{
    cursor: pointer;
    font-weight: 900;
    color: var(--help-text);
    list-style: none;
}

.help-faq-item summary::-webkit-details-marker{ display:none; }

.help-faq-item summary::after{
    content: '▾';
    float: right;
    color: var(--help-muted);
}

.help-faq-item[open] summary::after{ content: '▴'; }

.help-faq-body{
    color: var(--help-soft);
    margin-top: 10px;
    line-height: 1.5;
    font-size: 13px;
}

.help-bottom {
    display: flex;
    justify-content: flex-end;
    padding-top: 14px;
}

.help-top {
    text-decoration: none;
    font-weight: 900;
    border: 1px solid var(--help-border);
    background: rgba(255, 255, 255, 0.04);
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--help-text);
}

.help-top:hover {
    border-color: rgba(245, 194, 65, 0.45);
}

.help-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    margin-top: 16px;
    padding: 12px 6px;
    color: var(--help-muted);
    font-size: 12px;
}

.help-footer a {
    color: var(--help-soft);
    text-decoration: none;
    font-weight: 800;
}

.help-footer a:hover {
    color: var(--brand-gold);
}

@media (max-width: 920px) {
    .help-layout {
        grid-template-columns: 1fr;
    }

    .help-nav {
        position: relative;
        top: auto;
        max-height: none;
    }

    .help-header-right{
        align-items: stretch;
    }

    .help-chips{
        justify-content: flex-start;
    }

    .help-cards{
        grid-template-columns: 1fr;
    }

    .help-steps{
        grid-template-columns: 1fr;
    }

    .help-platforms{
        grid-template-columns: 1fr;
    }

    .help-grid{
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce){
    .help-card{ transition: none; }
}
