/* ==============================================================================
   SELLEX DOCS — DESIGN SYSTEM & DOCUMENTATION STYLES (docs.sellex.ao)
   Padrão visual oficial da Sellex:
   Fundo Deep Black: #000000 | Cards: #0e0e10 / #141417 | Bordas: #212124 / #323238
   Destaque: #FF6016 | Hover: #E5520D | Suave: rgba(255, 96, 22, 0.12)
   Texto: #FFFFFF / #EFECE5 | Secundário: #A1A1AA | Mudo: #71717A
   Zero Emojis — 100% Remix Icons (ri-*)
   ============================================================================== */

:root {
    --bg-main: #000000;
    --bg-sidebar: #060608;
    --bg-card: #0e0e11;
    --bg-card-hover: #15151a;
    --bg-card-alt: #121216;
    --bg-input: #09090b;
    --bg-code: #0b0b0e;
    --border-color: #212126;
    --border-hover: #37373f;
    --border-focus: #FF6016;
    
    --text-primary: #FFFFFF;
    --text-secondary: #EFECE5;
    --text-muted: #8E8E93;
    --text-dim: #5E5E66;
    
    --sellex-orange: #FF6016;
    --sellex-orange-hover: #E5520D;
    --sellex-orange-glow: rgba(255, 96, 22, 0.25);
    --sellex-orange-light: rgba(255, 96, 22, 0.12);
    --sellex-orange-subtle: rgba(255, 96, 22, 0.05);

    --success-green: #10B981;
    --success-light: rgba(16, 185, 129, 0.12);
    --info-blue: #3B82F6;
    --info-light: rgba(59, 130, 246, 0.12);
    --warning-yellow: #F59E0B;
    --warning-light: rgba(245, 158, 11, 0.12);
    
    --header-height: 64px;
    --sidebar-width: 290px;
    --toc-width: 240px;
    --content-max-width: 880px;
    
    --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 30px rgba(255, 96, 22, 0.15);
    --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Support */
body.light-theme {
    --bg-main: #FBFBFC;
    --bg-sidebar: #F4F4F6;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F8F8FA;
    --bg-card-alt: #F0F0F4;
    --bg-input: #FFFFFF;
    --bg-code: #F3F3F7;
    --border-color: #E2E2E8;
    --border-hover: #C8C8D2;
    --text-primary: #121214;
    --text-secondary: #2C2C30;
    --text-muted: #666670;
    --text-dim: #8E8E98;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Base Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    text-rendering: optimizeLegibility;
}

body {
    background-color: var(--bg-main);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    line-height: 1.65;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--sellex-orange);
}

/* Top Reading Progress Bar */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--sellex-orange), #FF8533);
    width: 0%;
    z-index: 1000;
    transition: width 0.1s ease-out;
}

/* ─────────────────────────────────────────────
   HEADER / TOPBAR
   ───────────────────────────────────────────── */
.docs-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(6, 6, 8, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

body.light-theme .docs-header {
    background: rgba(251, 251, 252, 0.92);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-sidebar-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 38px;
    height: 38px;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.btn-sidebar-toggle:hover {
    border-color: var(--sellex-orange);
    color: var(--sellex-orange);
}

.docs-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.docs-logo-img {
    height: 30px;
    width: auto;
    object-fit: contain;
}

.docs-badge-tag {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--sellex-orange-light);
    color: var(--sellex-orange);
    border: 1px solid rgba(255, 96, 22, 0.3);
    padding: 2px 8px;
    border-radius: 6px;
}

.header-center {
    flex: 1;
    max-width: 440px;
    margin: 0 24px;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-box i.ri-search-line {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    pointer-events: none;
}

.search-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 9px 40px 9px 40px;
    color: var(--text-primary);
    font-size: 0.88rem;
    outline: none;
    transition: all var(--transition-fast);
}

.search-input:focus {
    border-color: var(--sellex-orange);
    box-shadow: 0 0 0 3px rgba(255, 96, 22, 0.12);
}

.search-shortcut {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.72rem;
    color: var(--text-dim);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2px 6px;
    border-radius: 4px;
    pointer-events: none;
    font-family: var(--font-mono);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-link-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.87rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all var(--transition-fast);
}

.nav-link-item:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.nav-link-item i {
    font-size: 16px;
}

.btn-header-access {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--sellex-orange);
    color: #FFFFFF;
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all var(--transition-fast);
}

.btn-header-access:hover {
    background: var(--sellex-orange-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(255, 96, 22, 0.35);
}

.btn-theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 17px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.btn-theme-toggle:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}

/* ─────────────────────────────────────────────
   LAYOUT WRAPPER
   ───────────────────────────────────────────── */
.docs-layout {
    display: flex;
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
    width: 100%;
}

/* ─────────────────────────────────────────────
   SIDEBAR (Documentation Navigation Tree)
   ───────────────────────────────────────────── */
.docs-sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-group-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--text-dim);
    margin-bottom: 8px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sidebar-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.sidebar-link i {
    font-size: 16px;
    color: var(--text-dim);
    transition: color var(--transition-fast);
}

.sidebar-link:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.sidebar-link:hover i {
    color: var(--sellex-orange);
}

.sidebar-link.active {
    color: #FFFFFF;
    background: var(--sellex-orange-subtle);
    font-weight: 600;
}

body.light-theme .sidebar-link.active {
    color: var(--sellex-orange);
}

.sidebar-link.active i {
    color: var(--sellex-orange);
}

.sidebar-tag {
    margin-left: auto;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    background: var(--bg-card-alt);
    border: 1px solid var(--border-color);
    color: var(--text-dim);
}

.sidebar-tag.tag-orange {
    background: var(--sellex-orange-light);
    border-color: rgba(255, 96, 22, 0.3);
    color: var(--sellex-orange);
}

.sidebar-tag.tag-green {
    background: var(--success-light);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--success-green);
}

/* ─────────────────────────────────────────────
   MAIN DOCUMENTATION CONTENT
   ───────────────────────────────────────────── */
.docs-main-container {
    flex: 1;
    min-width: 0;
    padding: 40px 48px 80px 48px;
    display: flex;
    justify-content: center;
}

.docs-content-wrapper {
    max-width: var(--content-max-width);
    width: 100%;
}

/* Breadcrumbs */
.docs-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-bottom: 24px;
}

.docs-breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.docs-breadcrumbs a:hover {
    color: var(--sellex-orange);
}

.docs-breadcrumbs i {
    font-size: 12px;
}

/* Hero Title Section */
.doc-hero-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 32px;
    margin-bottom: 48px;
}

.doc-main-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1.18;
    margin-bottom: 16px;
}

.doc-lead-paragraph {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.doc-meta-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    font-size: 0.84rem;
    color: var(--text-dim);
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Section Headings */
.doc-section {
    margin-bottom: 56px;
    scroll-margin-top: calc(var(--header-height) + 24px);
}

.doc-section-title {
    font-size: 1.68rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.doc-section-title i {
    color: var(--sellex-orange);
    font-size: 1.5rem;
}

.doc-subsection-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 28px 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.doc-subsection-title i {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.doc-paragraph {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.7;
}

/* Callout Cards & Alerts */
.callout-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px 24px;
    margin: 24px 0;
    position: relative;
    display: flex;
    gap: 16px;
}

.callout-icon {
    font-size: 22px;
    color: var(--sellex-orange);
    flex-shrink: 0;
    margin-top: 2px;
}

.callout-content {
    flex: 1;
}

.callout-title {
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.callout-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.callout-box.callout-success {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.04);
}
.callout-box.callout-success .callout-icon {
    color: var(--success-green);
}

.callout-box.callout-info {
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.04);
}
.callout-box.callout-info .callout-icon {
    color: var(--info-blue);
}

/* Stat & Feature Grid */
.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.doc-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 22px;
    transition: all var(--transition-fast);
}

.doc-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.doc-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--sellex-orange-light);
    color: var(--sellex-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 14px;
}

.doc-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.doc-card-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.55;
}

/* Highlight Stat Number */
.stat-highlight-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--sellex-orange);
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 6px;
}

/* Step Flow Process */
.process-step-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 24px 0;
}

.process-step-card {
    display: flex;
    gap: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: border-color var(--transition-fast);
}

.process-step-card:hover {
    border-color: var(--border-hover);
}

.step-num-badge {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--sellex-orange-light);
    border: 1px solid rgba(255, 96, 22, 0.3);
    color: var(--sellex-orange);
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.step-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.step-tag {
    font-size: 0.72rem;
    color: var(--text-dim);
    background: var(--bg-card-alt);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.step-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Secret Code Visual Mockup */
.secret-code-visual {
    background: radial-gradient(circle at 50% 50%, rgba(255, 96, 22, 0.1) 0%, transparent 70%), var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 28px;
    margin: 28px 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.code-boxes-wrapper {
    display: flex;
    gap: 12px;
}

.code-digit-box {
    width: 54px;
    height: 64px;
    background: var(--bg-input);
    border: 2px solid var(--sellex-orange);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: #FFFFFF;
    font-family: var(--font-mono);
    box-shadow: 0 0 16px rgba(255, 96, 22, 0.2);
}

.secret-code-caption {
    font-size: 0.88rem;
    color: var(--text-muted);
    max-width: 520px;
    line-height: 1.5;
}

/* Code Snippets & API Blocks */
.code-block-wrapper {
    background: var(--bg-code);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin: 20px 0;
    overflow: hidden;
}

.code-block-header {
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.code-block-title {
    font-size: 0.78rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-copy-code {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-dim);
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
}

.btn-copy-code:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: var(--bg-card);
}

.btn-copy-code.copied {
    color: var(--success-green);
    border-color: var(--success-green);
}

.code-pre {
    padding: 16px 20px;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.86rem;
    line-height: 1.6;
    color: #EFECE5;
}

body.light-theme .code-pre {
    color: #1F2937;
}

.code-method {
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-right: 6px;
}
.method-get { background: rgba(59, 130, 246, 0.18); color: #60A5FA; }
.method-post { background: rgba(16, 185, 129, 0.18); color: #34D399; }
.method-put { background: rgba(245, 158, 11, 0.18); color: #FBBF24; }
.method-delete { background: rgba(239, 68, 68, 0.18); color: #F87171; }

/* Table Styling */
.doc-table-container {
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-card);
}

.doc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}

.doc-table th {
    background: var(--bg-card-alt);
    color: var(--text-primary);
    font-weight: 600;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-color);
}

.doc-table td {
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

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

.doc-table code {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--sellex-orange);
}

/* ─────────────────────────────────────────────
   TABLE OF CONTENTS (Right Side)
   ───────────────────────────────────────────── */
.docs-toc {
    width: var(--toc-width);
    flex-shrink: 0;
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    padding: 32px 16px;
}

.toc-title {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--text-dim);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.toc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-left: 1px solid var(--border-color);
    padding-left: 12px;
}

.toc-item a {
    display: block;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.82rem;
    line-height: 1.45;
    transition: color var(--transition-fast);
}

.toc-item a:hover {
    color: var(--text-primary);
}

.toc-item a.active {
    color: var(--sellex-orange);
    font-weight: 600;
}

/* ─────────────────────────────────────────────
   DOCS FOOTER
   ───────────────────────────────────────────── */
.docs-footer {
    border-top: 1px solid var(--border-color);
    margin-top: 64px;
    padding-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.btn-footer-page {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 14px 20px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    flex: 1;
}

.btn-footer-page:hover {
    border-color: var(--sellex-orange);
    color: #FFFFFF;
}

.btn-footer-page.next {
    justify-content: flex-end;
    text-align: right;
}

.footer-copyright {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-dim);
    padding-top: 16px;
}

/* ─────────────────────────────────────────────
   MOBILE HEADER (Estilo Idêntico a index.html e /chat)
   ───────────────────────────────────────────── */
.mobile-header-wrapper {
    display: none;
}

.sidebar-mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px 16px 4px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.sidebar-mobile-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-sidebar-close {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: all var(--transition-fast);
}

.btn-sidebar-close:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}

/* ─────────────────────────────────────────────
   RESPONSIVIDADE MOBILE
   ───────────────────────────────────────────── */
@media (max-width: 1100px) {
    .docs-toc {
        display: none;
    }
    .docs-main-container {
        padding: 32px 32px 64px 32px;
    }
}

@media (max-width: 860px) {
    /* Ocultar header padrão desktop */
    .docs-header {
        display: none !important;
    }

    .docs-layout {
        margin-top: 0;
    }

    /* Header Mobile em Pílula Flutuante */
    .mobile-header-wrapper {
        display: block;
        position: sticky;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 50000;
        padding-top: 16px;
        padding-bottom: 8px;
        background: var(--bg-main);
    }

    .mobile-header-container {
        width: 90%;
        margin: 0 auto;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 8px 16px;
        border-radius: 30px;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        background-color: rgba(128, 128, 128, 0.091);
        border: 1px solid rgba(255, 96, 22, 0.15);
    }

    body.light-theme .mobile-header-container {
        background-color: rgba(255, 255, 255, 0.9);
        border: 1px solid #E4E4E7;
    }

    .mobile-logo img {
        height: 26px;
        width: auto;
        display: block;
    }

    .mobile-icon-menu {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: var(--sellex-orange);
        color: #FFFFFF;
        cursor: pointer;
        border: none;
        box-shadow: 0 2px 8px rgba(255, 96, 22, 0.3);
        transition: transform 0.15s ease;
    }

    .mobile-icon-menu:active {
        transform: scale(0.92);
    }

    .mobile-icon-menu i {
        font-size: 18px;
        color: #FFFFFF;
    }

    /* Menu Dropdown Mobile */
    .mobile-dropdown-menu {
        position: fixed;
        top: 74px;
        right: 5%;
        width: 90%;
        max-width: 320px;
        z-index: 50000;
        border-radius: 16px;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        background-color: rgba(12, 12, 14, 0.95);
        border: 1px solid var(--border-color);
        padding: 16px;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-8px);
        transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    body.light-theme .mobile-dropdown-menu {
        background-color: #FFFFFF;
        border: 1px solid #E4E4E7;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    .mobile-dropdown-menu.open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .mobile-dropdown-list {
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .mobile-dropdown-item a {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 12px;
        border-radius: 10px;
        color: var(--text-primary);
        font-size: 13.5px;
        text-decoration: none;
        font-weight: 500;
        transition: background-color 0.15s;
    }

    .mobile-dropdown-item a.active {
        color: var(--sellex-orange);
        background: var(--sellex-orange-light);
        font-weight: 600;
    }

    .mobile-dropdown-item a:hover {
        background: var(--bg-card-hover);
    }

    .mobile-theme-toggle {
        width: 100%;
        margin-top: 12px;
        padding: 10px 12px;
        border-radius: 10px;
        background: var(--bg-card-hover);
        border: 1px solid var(--border-color);
        color: var(--text-secondary);
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
        font-size: 13.5px;
        transition: background-color 0.15s;
    }

    .btn-mobile-access {
        width: 100%;
        margin-top: 10px;
        padding: 12px;
        border-radius: 10px;
        background: var(--sellex-orange);
        color: #FFFFFF;
        border: none;
        font-weight: 600;
        font-size: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        transition: background 0.15s;
    }

    .btn-mobile-access:hover {
        background: var(--sellex-orange-hover);
    }

    /* Barra Rápida de Tópicos no Mobile */
    .mobile-quick-nav-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 90%;
        margin: 6px auto 14px auto;
        padding: 10px 16px;
        border-radius: 20px;
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        font-size: 0.84rem;
        color: var(--text-secondary);
        cursor: pointer;
        transition: all var(--transition-fast);
    }

    .mobile-quick-nav-bar:hover {
        border-color: var(--sellex-orange);
        color: var(--text-primary);
    }

    .mobile-quick-nav-bar span {
        display: flex;
        align-items: center;
        gap: 8px;
        font-weight: 600;
    }

    .mobile-quick-nav-bar span i {
        color: var(--sellex-orange);
        font-size: 16px;
    }

    .mobile-quick-nav-bar i.ri-arrow-right-s-line {
        color: var(--text-dim);
    }

    /* Sidebar Gaveta para Mobile */
    .sidebar-mobile-header {
        display: flex;
    }

    .docs-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: var(--bg-main);
        z-index: 55000;
        transition: left 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.7);
        padding: 20px 16px;
    }

    .docs-sidebar.open {
        left: 0;
    }

    .sidebar-backdrop {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.75);
        backdrop-filter: blur(4px);
        z-index: 54000;
    }

    .sidebar-backdrop.active {
        display: block;
    }

    .docs-main-container {
        padding: 16px 16px 60px 16px;
    }

    .doc-main-title {
        font-size: 1.85rem;
    }

    .doc-section-title {
        font-size: 1.35rem;
    }

    .footer-nav-buttons {
        flex-direction: column;
    }
}
