/* User Guide Dual-Theme System */
.guide-container {
    max-width: 1360px;
    margin: 2.5rem auto 5rem;
    padding: 0 2rem;
}

.guide-hero {
    text-align: center;
    padding: 3rem 1rem 3.5rem;
    position: relative;
}

.guide-hero .badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1.3rem;
    border-radius: var(--radius-full);
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

[data-theme="dark"] .guide-hero .badge-pill,
:root:not([data-theme="light"]) .guide-hero .badge-pill {
    color: #a5b4fc;
}

[data-theme="light"] .guide-hero .badge-pill {
    background: rgba(99, 102, 241, 0.08);
    color: #4f46e5;
    border-color: rgba(99, 102, 241, 0.25);
}

.guide-hero h1 {
    font-size: 3.6rem;
    letter-spacing: -0.04em;
    margin: 0 0 1rem 0;
    color: var(--heading-color);
}

[data-theme="dark"] .guide-hero h1,
:root:not([data-theme="light"]) .guide-hero h1 {
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .guide-hero h1 {
    color: #0f172a;
    -webkit-text-fill-color: initial;
    background: none;
}

.guide-hero p {
    font-size: 1.15rem;
    color: var(--primary-dim);
    max-width: 720px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

/* Quick Nav Sticky Anchor Bar */
.guide-quicknav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 3.5rem;
    position: sticky;
    top: 86px;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.6rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.guide-quicknav a {
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--primary-dim);
    padding: 0.55rem 1.15rem;
    border-radius: var(--radius-full);
    transition: all var(--duration-fast) var(--ease-out);
}

.guide-quicknav a:hover,
.guide-quicknav a.active {
    background: var(--accent-gradient);
    color: #ffffff !important;
    box-shadow: 0 0 16px var(--accent-glow);
}

/* Layout Grid */
.guide-grid {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Section Card */
.guide-section-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 3.5rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.guide-section-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--accent-gradient);
}

.section-title-wrap {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.section-icon-box {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
    color: var(--accent);
}

.section-title-wrap h2 {
    font-size: 1.9rem;
    margin: 0;
    color: var(--heading-color);
}

.section-title-wrap .role-tag {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.3rem 0.85rem;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: inline-block;
    margin-top: 0.35rem;
}

.tag-superadmin { 
    background: rgba(244, 63, 94, 0.15); 
    color: #fb7185; 
    border: 1px solid rgba(244, 63, 94, 0.3); 
}
[data-theme="light"] .tag-superadmin {
    background: rgba(244, 63, 94, 0.12);
    color: #e11d48;
}

.tag-scanner { 
    background: rgba(99, 102, 241, 0.15); 
    color: #a5b4fc; 
    border: 1px solid rgba(99, 102, 241, 0.3); 
}
[data-theme="light"] .tag-scanner {
    background: rgba(99, 102, 241, 0.12);
    color: #4f46e5;
}

.tag-all { 
    background: rgba(16, 185, 129, 0.15); 
    color: #34d399; 
    border: 1px solid rgba(16, 185, 129, 0.3); 
}
[data-theme="light"] .tag-all {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

/* Interactive Step-by-Step Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.8rem;
    margin: 2.2rem 0;
}

.step-card {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.2rem 2rem;
    position: relative;
    transition: transform var(--duration-normal) var(--ease-out), border-color var(--duration-normal) var(--ease-out);
}

.step-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    background: var(--bg-glass-hover);
}

.step-number {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--accent-gradient);
    color: #ffffff;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 0 14px var(--accent-glow);
}

.step-card h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1.2rem;
    color: var(--heading-color);
}

.step-card p {
    font-size: 0.92rem;
    color: var(--primary-dim);
    line-height: 1.6;
    margin: 0;
}

/* Feature Matrix & Key Cards */
.feature-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.75rem;
    margin: 2.2rem 0;
}

.feature-box {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.8rem;
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.feature-icon {
    font-size: 1.8rem;
    padding: 0.75rem;
    background: var(--bg-glass-hover);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    line-height: 1;
}

.feature-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.15rem;
    color: var(--heading-color);
}

.feature-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--primary-dim);
    line-height: 1.55;
}

/* Callout Alert Boxes */
.callout {
    padding: 1.4rem 1.8rem;
    border-radius: var(--radius-md);
    margin: 1.8rem 0;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    font-size: 0.92rem;
    line-height: 1.6;
}

.callout-info {
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--primary);
}

.callout-warning {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--primary);
}

.callout-tip {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--primary);
}

/* Code Snippet & Tables */
.format-box {
    background: var(--bg-secondary);
    color: var(--primary);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.guide-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
}

.guide-table th {
    background: var(--table-header-bg);
    padding: 1.1rem 1.4rem;
    text-align: left;
    font-size: 0.78rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--primary-dim);
    border-bottom: 1px solid var(--border);
}

.guide-table td {
    padding: 1.1rem 1.4rem;
    border-bottom: 1px solid var(--table-border);
    font-size: 0.92rem;
    color: var(--primary);
}

.guide-table tr:last-child td {
    border-bottom: none;
}

/* FAQ Accordions */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.8rem;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-glass);
    transition: all var(--duration-fast);
}

.faq-question {
    padding: 1.3rem 1.8rem;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    user-select: none;
    color: var(--heading-color);
}

.faq-question::after {
    content: '+';
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--primary-dim);
    transition: transform 0.3s var(--ease-out);
}

.faq-item.open .faq-question::after {
    transform: rotate(45deg);
    color: var(--accent);
}

.faq-answer {
    padding: 0 1.8rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s var(--ease-out), padding 0.3s var(--ease-out);
    color: var(--primary-dim);
    font-size: 0.95rem;
    line-height: 1.6;
}

.faq-item.open .faq-answer {
    padding: 1rem 1.8rem 1.6rem;
    max-height: 350px;
}

/* CTA Footer in Guide */
.guide-cta {
    text-align: center;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card-solid) 100%);
    border: 1px solid var(--border-light);
    color: var(--primary);
    border-radius: var(--radius-xl);
    padding: 4.5rem 2rem;
    margin-top: 4.5rem;
    box-shadow: var(--shadow-lg);
}

.guide-cta h2 {
    font-size: 2.6rem;
    margin-bottom: 1rem;
    color: var(--heading-color);
}

.guide-cta p {
    color: var(--primary-dim);
    max-width: 620px;
    margin: 0 auto 2.5rem;
    font-size: 1.1rem;
}

/* Responsive Table Container with Horizontal Touch Scroll */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem 0;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-card);
}

.table-responsive .guide-table {
    min-width: 620px;
    margin: 0;
    border: none;
}

.table-scroll-hint {
    display: none;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.76rem;
    color: var(--primary-dim);
    margin-top: -0.85rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 860px) {
    .table-scroll-hint {
        display: flex;
    }
}

@media (max-width: 860px) {
    .guide-container {
        padding: 0 0.85rem;
        margin: 1.25rem auto 3rem;
    }

    .guide-hero {
        padding: 1.75rem 0.5rem 2rem;
    }

    .guide-hero .badge-pill {
        font-size: 0.76rem;
        padding: 0.35rem 0.9rem;
        margin-bottom: 1rem;
    }

    .guide-hero h1 { 
        font-size: 1.75rem;
        line-height: 1.25;
        letter-spacing: -0.02em;
        margin-bottom: 0.75rem;
    }

    .guide-hero p {
        font-size: 0.92rem;
        line-height: 1.5;
        margin-bottom: 1.5rem;
    }

    /* Swipeable Horizontal QuickNav on Mobile */
    .guide-quicknav { 
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 0.45rem;
        padding: 0.4rem 0.6rem;
        border-radius: var(--radius-full);
        top: 68px;
        margin-bottom: 1.8rem;
        scrollbar-width: none;
    }

    .guide-quicknav::-webkit-scrollbar {
        display: none;
    }

    .guide-quicknav a {
        white-space: nowrap;
        font-size: 0.78rem;
        padding: 0.42rem 0.85rem;
        flex-shrink: 0;
    }

    .guide-section-card { 
        padding: 1.65rem 1.15rem; 
        border-radius: var(--radius-lg);
    }

    /* Keep Section Icon and Title side-by-side in a clean row */
    .section-title-wrap { 
        display: flex;
        flex-direction: row; 
        align-items: center; 
        gap: 0.85rem;
        margin-bottom: 1.25rem;
        padding-bottom: 1rem;
    }

    .section-icon-box {
        width: 44px;
        height: 44px;
        min-width: 44px;
        border-radius: 12px;
        font-size: 1.35rem;
        flex-shrink: 0;
    }

    .section-title-wrap h2 {
        font-size: 1.25rem;
        line-height: 1.3;
        margin: 0;
    }

    .section-title-wrap .role-tag {
        font-size: 0.68rem;
        padding: 0.2rem 0.6rem;
        margin-top: 0.25rem;
    }

    .feature-cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin: 1.25rem 0;
    }

    .feature-box {
        padding: 1.2rem;
        gap: 0.85rem;
    }

    .feature-icon {
        font-size: 1.35rem;
        padding: 0.5rem;
        border-radius: 10px;
    }

    .feature-content h4 {
        font-size: 1.05rem;
        margin-bottom: 0.35rem;
    }

    .feature-content p {
        font-size: 0.86rem;
        line-height: 1.5;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin: 1.25rem 0;
    }

    .step-card {
        padding: 1.35rem 1.15rem;
    }

    .step-number {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        font-size: 0.95rem;
        margin-bottom: 0.85rem;
    }

    .step-card h4 {
        font-size: 1.05rem;
        margin-bottom: 0.4rem;
    }

    .step-card p {
        font-size: 0.86rem;
        line-height: 1.5;
    }

    .callout {
        padding: 1rem 1.15rem;
        gap: 0.75rem;
        font-size: 0.86rem;
        margin: 1.25rem 0;
    }

    .guide-cta {
        padding: 2.5rem 1.25rem;
        margin-top: 3rem;
    }

    .guide-cta h2 {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    .guide-cta p {
        font-size: 0.92rem;
        margin-bottom: 1.75rem;
    }
}
