/* Nav section label (sub-group header inside a submenu) */
.submenu ul li.nav-section-label,
.sidebar-menu ul ul li.nav-section-label {
    margin: 10px 0 2px 0 !important;
    padding: 4px 15px 4px 50px !important;
    font-size: 0.62rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.12em !important;
    color: #adb5bd !important;
    pointer-events: none !important;
    cursor: default !important;
    border-top: 1px solid #f0f0f0 !important;
    display: block !important;
    line-height: 1.4 !important;
    list-style: none !important;
}

/* Top-level nav section label (divider above a run of add-on groups) */
.sidebar-menu ul li.nav-section-label-top {
    margin: 12px 0 4px 0 !important;
    padding: 6px 15px 6px 20px !important;
    font-size: 0.62rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.12em !important;
    color: #adb5bd !important;
    pointer-events: none !important;
    cursor: default !important;
    border-top: 1px solid #f0f0f0 !important;
    display: block !important;
    line-height: 1.4 !important;
    list-style: none !important;
}

/* Submenu styling */
.submenu ul {
    padding-left: 0;
    background-color: transparent;
    border-left: none;
    display: none;
}

.submenu ul li {
    margin: 2px 0;
}

.submenu ul li a {
    padding: 7px 15px 7px 20px;
    display: block;
    color: #374b5c;
    text-decoration: none;
    border-radius: 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
    font-size: 0.9rem;
}

.submenu ul li a:hover {
    background-color: transparent;
    color: #6156a5;
    border-bottom-color: transparent;
    text-decoration: underline;
    text-decoration-color: #6156a580;
    text-underline-offset: 3px;
}

.submenu ul li.active a {
    background-color: transparent;
    color: #6156a5;
    font-weight: 600;
    border-bottom-color: transparent;
    text-decoration: underline;
    text-decoration-color: #6156a5;
    text-underline-offset: 3px;
}

.sidebar-menu li a.subdrop:hover span { color: #ffffff; }
.sidebar-menu li a.subdrop i { color: #9C9C9C; }
.sidebar-menu li a.subdrop { color: #0D233E; }
.sidebar-menu li.active a.subdrop { color: #ffffff; }
.doc-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.doc-header h1 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: white !important;
}
.doc-header h1 i {
    color: white !important;
}
.doc-content{padding: 0 3rem;}

.doc-header p {
    font-size: 1rem;
    opacity: 0.9;
}
b, strong {
    font-weight: bolder;
}
strong{font-size: 1rem;}
.doc-content .faq-question, .doc-content .faq-answer, .doc-content li, blockquote, .doc-content table *, .doc-content p, .doc-content li strong{font-size: 1.1rem;}
.doc-content h4 {font-size: 1.5rem;}
.doc-content h3 {font-size: 2rem;}
.doc-content h2{font-size: 2.5rem;}
/* Override gallery CSS: span inside sidebar a must not be inline-block (breaks flex) */
.sidebar .sidebar-menu > ul > li > a span {
    display: inline !important;
    white-space: nowrap !important;
    margin-left: 0 !important;
}
/* Group label span: takes remaining space, compact font */
#sidebar .sidebar-menu > ul > li > a > span:first-of-type {
    font-weight: 400 !important;
    font-size: 12px !important;
    margin-left: 6px !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
}
/* menu-arrow span stays right, doesn't shrink */
#sidebar .sidebar-menu > ul > li > a > span.menu-arrow {
    margin-left: auto !important;
    flex-shrink: 0 !important;
}
/* Link is flex row, compact padding */
#sidebar .sidebar-menu > ul > li > a {
    display: flex !important;
    align-items: center !important;
    padding: 7px 6px 7px 8px !important;
    overflow: hidden !important;
}
/* Icon compact */
#sidebar .sidebar-menu ul li a i {
    font-size: 14px !important;
    width: 16px !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
}
/* Sidebar width — 270px default, same as gallery CSS */
.sidebar { overflow: hidden; width: 270px !important; top: 60px !important; padding-top: 0 !important; }
.page-wrapper { margin-left: 270px !important; padding-top: 0 !important; margin-top: 0 !important; }
.sidebar-inner { height: 100%; overflow-y: auto; overflow-x: hidden; }
/* Force page content to start right below the 60px fixed header — no gap */
.main-wrapper { padding-top: 60px !important; }

/* Category label: purple fill when active */
#sidebar .sidebar-menu li.submenu.active > a,
#sidebar .sidebar-menu li.submenu.active > a span,
#sidebar .sidebar-menu li.submenu.active > a i,
#sidebar .sidebar-menu li.submenu > a:hover,
#sidebar .sidebar-menu li.submenu > a:hover span,
#sidebar .sidebar-menu li.submenu > a:hover i {
    background-color: #6156a5 !important;
    color: #ffffff !important;
}

/* Sub-links indented right */
#sidebar .sidebar-menu .submenu ul li a {
    padding-left: 65px !important;
}

/* arrow span stays on right */
#sidebar .sidebar-menu > ul > li.submenu > a > span.menu-arrow {
    margin-left: auto !important;
    flex-shrink: 0 !important;
}

/* ── Header / nav overrides — fixes gallery CSS left:270px on docs pages ────── */
.header { display:flex !important; align-items:center !important; gap:0; padding:0 1.5rem !important; height:60px !important; background:#fff !important; border-bottom:1px solid #e9ecef !important; position:fixed !important; top:0 !important; left:0 !important; right:0 !important; z-index:1002 !important; }
.header-left, .header-left * { display:none !important; }
.mobile_btn { display:none !important; }
.header-brand { display:flex; align-items:center; gap:10px; text-decoration:none; flex-shrink:0; }
.header-brand img { height:28px; }
.header-brand-sep { width:1px; height:20px; background:#dee2e6; margin:0 12px; }
.header-brand-label { font-size:13px; font-weight:600; color:#6c757d; letter-spacing:0.02em; }
.header-search-wrap { flex:1; max-width:440px; margin:0 2rem; position:relative; }
.header-search { display:flex; align-items:center; gap:8px; background:#f8f9fa; border:1px solid #e9ecef; border-radius:8px; padding:7px 14px; cursor:text; transition:border-color .15s; }
.header-search:focus-within { border-color:#875a7b; }
.header-search i { color:#adb5bd; font-size:13px; }
.header-search input { flex:1; border:none; background:transparent; font-size:13px; color:#374b5c; outline:none; }
.header-search input::placeholder { color:#adb5bd; }
.header-search-kbd { font-size:10px; color:#adb5bd; background:#fff; border:1px solid #dee2e6; border-radius:4px; padding:1px 5px; font-family:monospace; flex-shrink:0; }
.header-actions { display:flex; align-items:center; gap:8px; margin-left:auto; }
.header-lang-switcher { display:flex; align-items:center; gap:4px; }
.header-lang-option { font-size:12px; font-weight:600; color:#adb5bd; text-decoration:none; padding:3px 6px; border-radius:5px; transition:all .15s; }
.header-lang-option:hover { color:#875a7b; background:#fdf6ff; }
.header-lang-option.active { color:#875a7b; }
.header-lang-divider { font-size:11px; color:#dee2e6; }
.btn-go-app { display:flex !important; align-items:center !important; gap:6px; padding:7px 16px !important; border-radius:8px !important; background:#875a7b !important; color:#fff !important; font-size:13px !important; font-weight:600 !important; text-decoration:none !important; transition:background .15s; white-space:nowrap; }
.btn-go-app:hover { background:#714868 !important; color:#fff !important; }
.btn-home-link { display:flex; align-items:center; gap:5px; font-size:13px; font-weight:500; color:#374b5c; text-decoration:none; padding:5px 10px; border-radius:6px; transition:all .15s; white-space:nowrap; }
.btn-home-link:hover { color:#875a7b; background:#fdf6ff; }

/* ── Doc content classes (shared across all documentation pages) ───────────── */
.doc-section { margin-bottom: 3rem; }
.doc-section h2 { color: #2c3e50; font-size: 1.8rem; font-weight: 700; margin-bottom: 1.5rem; border-bottom: 3px solid #3498db; padding-bottom: .5rem; }
.doc-section h3 { color: #34495e; font-size: 1.4rem; font-weight: 600; margin-bottom: 1rem; margin-top: 2rem; }
.doc-section p { color: #555; line-height: 1.7; margin-bottom: 1.5rem; font-size: 1.1rem; }
.doc-section ul, .doc-section ol { color: #555; line-height: 1.7; margin-bottom: 1.5rem; padding-left: 2rem; }
.doc-section li { margin-bottom: .5rem; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin: 2rem 0; }
.feature-card { background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 8px; padding: 1.5rem; transition: transform .3s ease; }
.feature-card:hover { transform: translateY(-5px); box-shadow: 0 4px 15px rgba(0,0,0,.1); }
.feature-card h4 { color: #2c3e50; font-size: 1.1rem; font-weight: 600; margin-bottom: .75rem; }
.feature-card p { font-size: .95rem; margin: 0; color: #555; }
.highlight-box { background: #e8f4fd; border-left: 4px solid #3498db; padding: 1.5rem; margin: 2rem 0; border-radius: 0 6px 6px 0; }
.highlight-box h4 { color: #2c3e50; margin-bottom: 1rem; }
.tip-box { background: #d1ecf1; border-left: 4px solid #17a2b8; padding: 1.5rem; margin: 1.5rem 0; border-radius: 0 6px 6px 0; }
.tip-box h4 { color: #0c5460; margin-bottom: .75rem; }
.warning-box { background: #fff3cd; border-left: 4px solid #ffc107; padding: 1.5rem; margin: 1.5rem 0; border-radius: 0 6px 6px 0; }
.warning-box h4 { color: #856404; margin-bottom: .75rem; }
.faq-item { background: #fff; border: 1px solid #e9ecef; border-radius: 8px; margin-bottom: 1rem; overflow: hidden; }
.faq-question { background: #f8f9fa; padding: 1.25rem 1.5rem; font-weight: 600; color: #2c3e50; border-bottom: 1px solid #e9ecef; }
.faq-answer { padding: 1.25rem 1.5rem; color: #555; line-height: 1.6; }
.data-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.data-table th { background: #f1f5f9; color: #2c3e50; font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .75rem 1rem; text-align: left; border-bottom: 2px solid #e2e8f0; }
.data-table td { padding: .75rem 1rem; color: #555; border-bottom: 1px solid #f1f5f9; font-size: .95rem; }
.data-table tr:hover td { background: #f8fafc; }
.step-flow { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 1.5rem 0; }
.flow-step { background: #3498db; color: #fff; border-radius: 6px; padding: .5rem 1rem; font-size: .875rem; font-weight: 600; white-space: nowrap; }
.flow-arrow { color: #3498db; font-size: 1.1rem; font-weight: 700; }


/* ── Search results dropdown ─────────────────────────────────────────── */
.search-results { position:absolute; top:100%; left:0; right:0; background:#fff; border:1px solid #e9ecef; border-top:none; border-radius:0 0 8px 8px; max-height:320px; overflow-y:auto; z-index:1100; display:none; box-shadow:0 8px 24px rgba(0,0,0,0.10); }
.search-results.open { display:block; }
.search-result-item { display:flex; align-items:center; gap:10px; padding:10px 14px; color:#374b5c; text-decoration:none; border-bottom:1px solid #f0f0f0; font-size:13px; line-height:1.4; transition:background .12s; }
.search-result-item:last-child { border-bottom:none; }
.search-result-item:hover { background:#f0f7ff; color:#6156a5; }
.search-result-item i { color:#6156a5; font-size:12px; width:16px; text-align:center; flex-shrink:0; }
.search-result-item > span:first-of-type { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.search-result-cat { font-size:10px; color:#adb5bd; margin-left:auto; white-space:nowrap; flex-shrink:0; padding-left:8px; }
.search-no-result { padding:16px 14px; color:#adb5bd; font-size:13px; text-align:center; }
