/*!
 * eSellify Documentation - Modern UI
 * Blue theme matching eSellify branding
 */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: none;
}

body {
    font-family: 'Poppins', sans-serif;
    color: #2d3748;
    background-color: #f7f9fc;
    min-height: 100vh;
    line-height: 1.7;
}

::selection {
    background: #3068FF;
    color: #fff;
}

::-moz-selection {
    background: #3068FF;
    color: #fff;
}

a {
    color: #2554D4;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #1A3FA0;
    text-decoration: underline;
}

img {
    border: 0;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin: 12px 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

p, ul, ol {
    margin: 14px 0;
    line-height: 1.8;
}

li {
    list-style: none;
}

strong, b {
    font-weight: 600;
}

hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, #3068FF, #6d9aff, transparent);
    margin: 20px 0;
}

hr.notop {
    margin-top: 0;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f0f2f5;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3068FF, #6d9aff);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2554D4;
}

/* ===== Sidebar ===== */
#documenter_sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 300px;
    height: 100vh;
    background: linear-gradient(180deg, #1c1c1c 0%, #2a2a2a 50%, #333333 100%);
    z-index: 100;
    padding: 0;
    overflow: hidden;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
}

#documenter_sidebar #documenter_logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 22px 20px;
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
    text-decoration: none;
}

#documenter_sidebar #documenter_logo img {
    max-height: 60px;
    width: 60px;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
}

#documenter_sidebar #documenter_logo img:hover {
    transform: none;
    box-shadow: none;
}

.logo-title {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #3068FF, #5B8AFF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

#documenter_sidebar ul {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 15px 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}

#documenter_sidebar ul::-webkit-scrollbar {
    width: 4px;
}
#documenter_sidebar ul::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
}

#documenter_sidebar ul li {
    margin-bottom: 2px;
}

#documenter_sidebar ul > li > a {
    display: block;
    padding: 10px 16px;
    color: rgba(255,255,255,0.7);
    font-size: 13.5px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    background: transparent;
    text-decoration: none;
    line-height: 1.4;
}

#documenter_sidebar ul > li > a:hover {
    background: rgba(48, 104, 255, 0.12);
    color: #fff;
    border-left-color: #3068FF;
    text-decoration: none;
    padding-left: 20px;
}

#documenter_sidebar ul > li > a.current {
    background: linear-gradient(135deg, #3068FF, #2554D4);
    color: #fff;
    border-left-color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(48, 104, 255, 0.3);
    text-decoration: none;
}

/* Submenu */
#documenter_sidebar ul li ul {
    margin: 4px 0 8px 12px;
    padding: 0 !important;
    display: block;
}

#documenter_sidebar ul li ul li {
    margin-bottom: 1px;
}

#documenter_sidebar ul li ul li a {
    display: block;
    padding: 7px 12px 7px 20px;
    color: rgba(255,255,255,0.5);
    font-size: 12.5px;
    font-weight: 400;
    border-radius: 6px;
    transition: all 0.3s ease;
    border-left: 2px solid transparent;
    background: transparent;
    text-decoration: none;
}

#documenter_sidebar ul li ul li a:hover {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.85);
    border-left-color: #6d9aff;
    text-decoration: none;
}

#documenter_sidebar ul li ul li a.current {
    background: rgba(48, 104, 255, 0.18);
    color: #fff;
    border-left-color: #3068FF;
    text-decoration: none;
}

#documenter_copyright {
    padding: 12px 16px;
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
    background: rgba(0,0,0,0.15);
}

/* ===== Main Content ===== */
#documenter_content {
    margin-left: 300px;
    padding: 40px 50px 100px;
    max-width: 1100px;
    min-height: 100vh;
}

/* ===== Cover / Intro Section ===== */
#documenter_cover {
    padding-top: 20px !important;
}

/* ===== Hero Banner ===== */
.hero-banner {
    background: linear-gradient(135deg, #3068FF 0%, #2554D4 50%, #1A3FA0 100%);
    border-radius: 16px;
    padding: 40px 45px;
    color: #fff;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(48, 104, 255, 0.25);
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.hero-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 250px;
    height: 250px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.hero-banner h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.hero-banner p {
    font-size: 16px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    margin: 0;
}

.hero-banner .version-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin-top: 12px;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(5px);
}

/* ===== Quick Info Cards ===== */
.quick-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 25px 0 30px;
}

.quick-info-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid #e8ecf4;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.quick-info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.quick-info-card .card-icon {
    font-size: 28px;
    margin-bottom: 10px;
}

.quick-info-card .card-label {
    font-size: 12px;
    color: #8892a6;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.quick-info-card .card-value {
    font-size: 15px;
    font-weight: 600;
    color: #2d3748;
}

.quick-info-card .card-value a {
    color: #2554D4;
    font-weight: 600;
}

/* ===== Section Styling ===== */
#documenter_content section {
    padding-top: 30px;
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-header {
    margin-bottom: 8px;
}

#documenter_content h1 {
    font-size: 30px;
    font-weight: 700;
    color: #1a202c;
}

#documenter_content h2 {
    font-size: 26px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#documenter_content h3 {
    font-size: 22px;
    font-weight: 600;
    color: #2d3748;
    margin: 25px 0 14px;
    padding-left: 14px;
    border-left: 4px solid #3068FF;
}

#documenter_content h4 {
    font-size: 19px;
    font-weight: 600;
    color: #2d3748;
    margin: 20px 0 12px;
}

#documenter_content h5 {
    font-size: 16px;
    font-weight: 600;
    color: #4a5568;
    margin: 18px 0 10px;
}

#documenter_content h6 {
    font-size: 14px;
    font-weight: 500;
    color: #718096;
    margin: 14px 0;
}

#documenter_content p {
    margin: 0 0 16px;
    color: #4a5568;
}

/* ===== Lists ===== */
#documenter_content ol li {
    list-style: decimal;
    margin-left: 30px;
    margin-bottom: 6px;
    color: #4a5568;
}

#documenter_content ul li {
    list-style: none;
    margin-left: 0;
    margin-bottom: 8px;
    padding: 4px 0 4px 22px;
    position: relative;
    color: #4a5568;
}

#documenter_content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 13px;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #3068FF, #6d9aff);
    border-radius: 50%;
}

#documenter_content ul li span {
    font-weight: 600;
    color: #2d3748;
}

#documenter_content ul li span.green {
    color: #38a169;
    font-weight: 500 !important;
    background: #f0fff4;
    padding: 1px 6px;
    border-radius: 4px;
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 14px;
}

#documenter_content ul ul {
    padding: 4px 0 4px 10px !important;
    margin: 0;
}

#documenter_content ul ul li::before {
    width: 6px;
    height: 6px;
    background: #cbd5e0;
    top: 14px;
}

#documenter_content a {
    color: #2554D4;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px dashed rgba(37, 84, 212, 0.3);
    transition: all 0.3s ease;
}

#documenter_content a:hover {
    border-bottom-color: #2554D4;
    text-decoration: none;
}

/* ===== Code Blocks ===== */
pre {
    margin: 14px 0 20px !important;
    max-width: 100%;
    white-space: pre-wrap;
    border: none !important;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace !important;
    color: #e2e8f0 !important;
    background: #1e293b !important;
    padding: 18px 22px !important;
    tab-size: 2 !important;
    line-height: 1.7 !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    word-break: break-all;
    word-wrap: break-word;
    display: block;
    overflow: auto;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-left: 4px solid #3068FF !important;
}

code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}

pre code {
    padding: 0;
    font-size: inherit !important;
    color: inherit;
    white-space: pre-wrap;
    background-color: transparent;
    border-radius: 0;
}

:not(pre) > code {
    padding: 2px 8px;
    font-size: 13px !important;
    color: #2554D4;
    background-color: #eef3ff;
    border-radius: 6px;
    border: 1px solid #c7d7ff;
}

pre .string {
    color: #a5d6a7 !important;
}

pre .keyword {
    color: #ef9a9a !important;
}

/* ===== Info & Warning Boxes ===== */
.info-box {
    padding: 18px 22px;
    background: linear-gradient(135deg, #f0f4ff, #e8eeff);
    border-radius: 12px;
    border-left: 4px solid #3068FF;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(48, 104, 255, 0.08);
}

.info-box h5 {
    font-size: 15px;
    color: #1a3fa0;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-box p,
.info-box ul li {
    color: #1a3fa0;
    font-size: 14px;
}

.info-box ul li::before {
    background: #3068FF !important;
}

.warning-box.info-box {
    background: linear-gradient(135deg, #fff5f5, #fef2f2);
    border-color: #e53e3e;
    box-shadow: 0 2px 10px rgba(229, 62, 62, 0.08);
}

.warning-box.info-box h5 {
    color: #c53030;
}

.warning-box ul li,
.warning-box p,
.warning-box span {
    color: #c53030 !important;
}

.warning-box ul li::before {
    background: #e53e3e !important;
}

/* ===== Success Box ===== */
.success-box {
    padding: 18px 22px;
    background: linear-gradient(135deg, #f0fff4, #f0fdf4);
    border-radius: 12px;
    border-left: 4px solid #38a169;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(56, 161, 105, 0.08);
}

.success-box h5 {
    color: #276749;
    font-size: 15px;
}

.success-box p,
.success-box li {
    color: #276749;
}

/* ===== Image Row ===== */
.image-row {
    display: flex;
    gap: 16px;
    margin: 16px 0;
    flex-wrap: wrap;
}

.image-row img {
    flex: 1;
    min-width: 280px;
    max-width: calc(50% - 8px);
}

/* ===== Step Cards ===== */
.step-card {
    background: #fff;
    border-radius: 14px;
    padding: 24px 28px;
    margin: 16px 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    border: 1px solid #e8ecf4;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.step-card .step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #3068FF, #2554D4);
    color: #fff;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    margin-right: 12px;
}

/* ===== Feature Grid ===== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
    margin: 20px 0;
}

.feature-item {
    background: #fff;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #e8ecf4;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.feature-item .feature-icon {
    font-size: 30px;
    margin-bottom: 10px;
}

.feature-item h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #2d3748;
}

.feature-item p {
    font-size: 13px;
    color: #718096;
    margin: 0;
}

/* ===== Requirements Table ===== */
.requirements-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin: 16px 0;
}

.requirements-table thead th {
    background: linear-gradient(135deg, #1c1c1c, #333333);
    color: #fff;
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.requirements-table tbody td {
    padding: 12px 18px;
    border-bottom: 1px solid #e8ecf4;
    font-size: 14px;
    color: #4a5568;
    background: #fff;
}

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

.requirements-table tbody tr:hover td {
    background: #f0f4ff;
}

/* ===== TOC Box ===== */
.toc-box {
    background: #fff;
    border-radius: 14px;
    padding: 24px 28px;
    margin: 20px 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid #e8ecf4;
}

.toc-box h4 {
    font-size: 18px;
    margin-bottom: 14px;
    color: #1a202c;
}

.toc-box ol {
    counter-reset: toc;
    padding-left: 0;
    margin: 0;
}

.toc-box ol li {
    counter-increment: toc;
    list-style: none !important;
    margin-left: 0 !important;
    padding: 8px 0;
    font-size: 14px;
    position: relative;
}

.toc-box ol li::before {
    content: counter(toc) ".";
    color: #3068FF;
    font-weight: 700;
    margin-right: 8px;
    position: static;
    width: auto;
    height: auto;
    background: none;
    border-radius: 0;
}

/* ===== Changelog ===== */
.changelog-entry {
    background: #fff;
    border-radius: 14px;
    padding: 24px 28px;
    margin: 18px 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    border: 1px solid #e8ecf4;
    border-left: 4px solid #3068FF;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.changelog-entry:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.changelog-entry.latest {
    border-left-color: #38a169;
    background: linear-gradient(135deg, #f0fff4 0%, #fff 40%);
}

.changelog-version {
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.changelog-date {
    font-size: 13px;
    font-weight: 500;
    color: #718096;
    background: #e8ecf4;
    padding: 3px 12px;
    border-radius: 20px;
}

.changelog-entry.latest .changelog-date {
    background: #c6f6d5;
    color: #276749;
}

.badge-latest {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #38a169, #48bb78);
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.changelog-category {
    font-size: 14px;
    font-weight: 600;
    color: #3068FF;
    margin: 14px 0 6px;
    padding-left: 0;
    border-left: none;
}

.changelog-entry ul {
    margin: 6px 0 0;
}

.changelog-entry ul li {
    font-size: 14px;
    padding: 3px 0 3px 22px;
    color: #4a5568;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #3068FF, #2554D4);
    color: #fff;
    box-shadow: 0 4px 12px rgba(48, 104, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(48, 104, 255, 0.4);
    text-decoration: none;
    color: #fff;
}

/* ===== Alert Boxes ===== */
#documenter_content div.alert {
    padding: 14px 20px;
    border-radius: 10px;
    margin: 16px 0;
    font-size: 14px;
}

#documenter_content div.alert-success {
    background: #f0fff4;
    border: 1px solid #c6f6d5;
    color: #276749;
}

#documenter_content div.alert-danger,
#documenter_content div.alert-error {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    color: #c53030;
}

#documenter_content div.alert-info {
    background: #f0f4ff;
    border: 1px solid #c7d7ff;
    color: #1a3fa0;
}

/* ===== Back to Top ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, #3068FF, #2554D4);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(48, 104, 255, 0.3);
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s ease;
    text-decoration: none;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(48, 104, 255, 0.4);
    text-decoration: none;
    color: #fff;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    #documenter_sidebar {
        width: 260px;
    }
    #documenter_content {
        margin-left: 260px;
        padding: 30px 25px 80px;
    }
}

@media (max-width: 768px) {
    #documenter_sidebar {
        position: relative;
        width: 100%;
        height: auto;
        max-height: none;
    }
    #documenter_sidebar ul {
        height: auto;
        max-height: 300px;
    }
    #documenter_content {
        margin-left: 0;
        padding: 20px 16px 60px;
    }
    .hero-banner {
        padding: 28px 22px;
    }
    .hero-banner h1 {
        font-size: 24px;
    }
    .quick-info {
        grid-template-columns: 1fr;
    }
    .image-row {
        flex-direction: column;
    }
    .image-row img {
        max-width: 100%;
    }
    .feature-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Print Styles ===== */
@media print {
    * {
        background: transparent !important;
        color: black !important;
        text-shadow: none !important;
        box-shadow: none !important;
    }

    #documenter_sidebar {
        display: none;
    }

    #documenter_content {
        margin-left: 0;
        padding: 20px;
    }

    .hero-banner {
        border: 2px solid #000;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }

    pre, blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    img {
        page-break-inside: avoid;
    }

    .back-to-top {
        display: none;
    }
}
