/* ============================================
   Documentation Layout - Modern & Clean
   ============================================ */

.docs-layout {
    display: grid;
    grid-template-columns: 280px 1fr 220px;
    grid-template-areas: "sidebar content toc";
    gap: 0;
    min-height: 100vh;
    padding-top: 70px;
}

@media (max-width: 1200px) {
    .docs-layout {
        grid-template-columns: 280px 1fr;
        grid-template-areas: "sidebar content";
    }
    
    .docs-toc {
        display: none;
    }
}

@media (max-width: 968px) {
    .docs-layout {
        grid-template-columns: 1fr;
        grid-template-areas: "content";
    }
    
    .docs-sidebar {
        position: fixed;
        left: -100%;
        top: 70px;
        height: calc(100vh - 70px);
        z-index: 100;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .docs-sidebar.active {
        left: 0;
    }
}

/* ============================================
   Sidebar Navigation
   ============================================ */

.docs-sidebar {
    grid-area: sidebar;
    background: #FAFAFA;
    border-right: 1px solid #E0E0E0;
    padding: 2rem 0;
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #BDBDBD #FAFAFA;
}

.docs-sidebar::-webkit-scrollbar {
    width: 6px;
}

.docs-sidebar::-webkit-scrollbar-track {
    background: #FAFAFA;
}

.docs-sidebar::-webkit-scrollbar-thumb {
    background: #BDBDBD;
    border-radius: 3px;
}

.docs-sidebar-header {
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid #E0E0E0;
    margin-bottom: 1.5rem;
}

.docs-sidebar-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2E7D32;
    margin-bottom: 1rem;
}

.docs-search {
    position: relative;
}

.docs-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #757575;
}

.docs-search input {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.docs-search input:focus {
    outline: none;
    border-color: #2E7D32;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.docs-nav {
    padding: 0 1rem;
}

.docs-nav-section {
    margin-bottom: 2rem;
}

.docs-nav-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #757575;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
}

.docs-nav ul {
    list-style: none;
}

.docs-nav ul li {
    margin-bottom: 0.25rem;
}

.docs-nav ul li a {
    display: block;
    padding: 0.625rem 0.75rem;
    color: #424242;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9375rem;
    transition: all 0.2s;
}

.docs-nav ul li a:hover {
    background: #E0E0E0;
    color: #2E7D32;
}

.docs-nav ul li a.active {
    background: #2E7D32;
    color: white;
    font-weight: 500;
}

.docs-sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid #E0E0E0;
    margin-top: 2rem;
}

.docs-help-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #2E7D32;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.docs-help-link:hover {
    background: #1B5E20;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(46, 125, 50, 0.2);
}

/* ============================================
   Main Content
   ============================================ */

.docs-content {
    grid-area: content;
    padding: 3rem 4rem;
    max-width: 850px;
    margin: 0 auto;
}

@media (max-width: 968px) {
    .docs-content {
        padding: 2rem 1.5rem;
    }
}

.docs-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: #757575;
}

.docs-breadcrumb a {
    color: #2E7D32;
    text-decoration: none;
}

.docs-breadcrumb a:hover {
    text-decoration: underline;
}

.docs-breadcrumb i {
    font-size: 0.75rem;
}

.docs-section {
    margin-bottom: 4rem;
    scroll-margin-top: 100px;
}

.docs-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #212121;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.docs-lead {
    font-size: 1.25rem;
    color: #616161;
    margin-bottom: 2rem;
}

.docs-section h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #212121;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #2E7D32;
}

.docs-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #424242;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.docs-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #424242;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.docs-section p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: #424242;
}

.docs-section ul {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.docs-section ul li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
    color: #424242;
}

/* ============================================
   Alerts & Callouts
   ============================================ */

.docs-alert {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    border-left: 4px solid;
}

.docs-alert i {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.docs-alert strong {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.docs-alert p {
    margin: 0;
    font-size: 0.9375rem;
}

.docs-alert a {
    color: inherit;
    text-decoration: underline;
}

.docs-alert-info {
    background: #E3F2FD;
    border-color: #2196F3;
    color: #0D47A1;
}

.docs-alert-info i {
    color: #2196F3;
}

.docs-alert-tip {
    background: #F1F8E9;
    border-color: #4CAF50;
    color: #1B5E20;
}

.docs-alert-tip i {
    color: #4CAF50;
}

.docs-alert-warning {
    background: #FFF3E0;
    border-color: #FF9800;
    color: #E65100;
}

.docs-alert-warning i {
    color: #FF9800;
}

.docs-success {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: #E8F5E9;
    border-left: 4px solid #4CAF50;
    border-radius: 8px;
    color: #1B5E20;
    margin: 1.5rem 0;
}

.docs-success i {
    font-size: 1.25rem;
    color: #4CAF50;
}

/* ============================================
   Quick Links Cards
   ============================================ */

.docs-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.docs-quick-link {
    padding: 2rem;
    background: white;
    border: 2px solid #E0E0E0;
    border-radius: 16px;
    transition: all 0.3s;
}

.docs-quick-link:hover {
    border-color: #2E7D32;
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(46, 125, 50, 0.1);
}

.docs-quick-link i {
    font-size: 2.5rem;
    color: #2E7D32;
    margin-bottom: 1rem;
}

.docs-quick-link h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #212121;
    margin: 0 0 0.5rem 0;
}

.docs-quick-link p {
    color: #757575;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.docs-quick-link a {
    color: #2E7D32;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.docs-quick-link a:hover {
    text-decoration: underline;
}

/* ============================================
   Glossary
   ============================================ */

.glossary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.glossary-item {
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    border-left: 4px solid #4CAF50;
}

.glossary-item dt {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2E7D32;
    margin-bottom: 0.5rem;
}

.glossary-item dd {
    margin: 0;
    color: #616161;
    line-height: 1.6;
}

/* ============================================
   Steps
   ============================================ */

.docs-steps {
    margin: 2rem 0;
}

.docs-step {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.docs-step-number {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #2E7D32, #4CAF50);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    box-shadow: 0 4px 8px rgba(46, 125, 50, 0.2);
}

.docs-step-content {
    flex: 1;
}

.docs-step-content h3 {
    font-size: 1.375rem;
    margin: 0 0 0.75rem 0;
    color: #212121;
}

.docs-step-content p {
    margin-bottom: 1rem;
}

/* ============================================
   Code Blocks
   ============================================ */

.docs-code {
    background: #263238;
    color: #AEDD84;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.docs-code code {
    background: none;
    padding: 0;
    color: inherit;
}

code {
    background: #F5F5F5;
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.875em;
    color: #D32F2F;
}

/* ============================================
   Tables
   ============================================ */

.docs-field-table {
    margin: 2rem 0;
}

.docs-field-table h3 {
    margin-bottom: 1rem;
}

.docs-field-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.docs-field-table thead {
    background: #2E7D32;
    color: white;
}

.docs-field-table th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9375rem;
}

.docs-field-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #E0E0E0;
}

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

.docs-field-table tbody tr:hover {
    background: #F5F5F5;
}

/* ============================================
   Field List
   ============================================ */

.docs-field-list {
    background: white;
    border: 2px solid #E0E0E0;
    border-radius: 12px;
    overflow: hidden;
    margin: 1.5rem 0;
}

.docs-field {
    display: flex;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #E0E0E0;
}

.docs-field:last-child {
    border-bottom: none;
}

.docs-field strong {
    color: #2E7D32;
    font-weight: 600;
}

.docs-field span {
    color: #616161;
}

/* ============================================
   Navigation Buttons (Prev/Next)
   ============================================ */

.docs-nav-bottom {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid #E0E0E0;
}

.docs-nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.docs-nav-buttons .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.docs-nav-buttons .btn-primary {
    background: #2E7D32;
    color: white;
    border: 2px solid #2E7D32;
}

.docs-nav-buttons .btn-primary:hover {
    background: #1B5E20;
    border-color: #1B5E20;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(46, 125, 50, 0.2);
}

.docs-nav-buttons .btn-outline {
    background: white;
    color: #2E7D32;
    border: 2px solid #2E7D32;
}

.docs-nav-buttons .btn-outline:hover {
    background: #F1F8E9;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .docs-nav-buttons {
        flex-direction: column;
    }
}

/* ============================================
   Table of Contents (Right Sidebar)
   ============================================ */

.docs-toc {
    grid-area: toc;
    padding: 3rem 1.5rem 3rem 1rem;
    position: sticky;
    top: 70px;
    height: fit-content;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    border-left: 1px solid #E0E0E0;
}

.docs-toc h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: #757575;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.docs-toc nav ul {
    list-style: none;
}

.docs-toc nav ul li {
    margin-bottom: 0.5rem;
}

.docs-toc nav ul li a {
    color: #616161;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.docs-toc nav ul li a:hover,
.docs-toc nav ul li a.active {
    color: #2E7D32;
}

/* ============================================
   Progress Bar
   ============================================ */

.docs-progress {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    height: 3px;
    background: #E0E0E0;
    z-index: 1000;
}

.docs-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #2E7D32, #4CAF50);
    width: 0%;
    transition: width 0.3s ease;
}

/* ============================================
   Step Box (from guide)
   ============================================ */

.step-box {
    background: #f9fafb;
    border-left: 4px solid #2E7D32;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 8px;
}

.step-number {
    background: #2E7D32;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 10px;
    font-size: 1.1rem;
}

/* ============================================
   Warning Box
   ============================================ */

.warning-box {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.warning-box .warning-icon {
    color: #f59e0b;
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* ============================================
   Tip Box
   ============================================ */

.tip-box {
    background: #dbeafe;
    border-left: 4px solid #3b82f6;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.tip-box .tip-icon {
    color: #3b82f6;
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* ============================================
   Success Box
   ============================================ */

.success-box {
    background: #d1fae5;
    border-left: 4px solid #10b981;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.success-box .success-icon {
    color: #10b981;
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* ============================================
   Field List (enhanced)
   ============================================ */

.field-list {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 0;
    margin: 1.5rem 0;
    overflow: hidden;
}

.field-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .field-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

.field-item:last-child {
    border-bottom: none;
}

.field-name {
    font-weight: 700;
    color: #2E7D32;
}

.field-desc {
    color: #6b7280;
}

/* ============================================
   Example Box
   ============================================ */

.example-box {
    background: #f3f4f6;
    border: 2px dashed #9ca3af;
    border-radius: 10px;
    padding: 1.25rem;
    margin: 1.5rem 0;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.example-label {
    font-weight: bold;
    color: #4b5563;
    margin-bottom: 0.75rem;
    font-family: 'Inter', -apple-system, sans-serif;
}

/* ============================================
   Workflow Visual
   ============================================ */

.workflow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(to right, #E8F5E9, #C8E6C9);
    border-radius: 12px;
    overflow-x: auto;
}

.workflow-step {
    flex: 1;
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    margin: 0 0.5rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    min-width: 100px;
}

.workflow-step .icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.workflow-arrow {
    font-size: 1.5rem;
    color: #2E7D32;
    font-weight: bold;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .workflow {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .workflow-arrow {
        transform: rotate(90deg);
    }
    
    .workflow-step {
        margin: 0;
        width: 100%;
    }
}

/* ============================================
   Glossary Enhanced
   ============================================ */

.glossary {
    background: #fef3c7;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.glossary h3 {
    color: #92400e;
    margin-bottom: 1rem;
}

.glossary dl {
    margin: 0;
}

.glossary dt {
    font-weight: bold;
    color: #92400e;
    margin-top: 1rem;
    font-size: 1.1rem;
}

.glossary dt:first-child {
    margin-top: 0;
}

.glossary dd {
    color: #78350f;
    margin-left: 1.5rem;
    margin-top: 0.25rem;
    line-height: 1.6;
}

/* ============================================
   Tables Enhanced
   ============================================ */

.docs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.docs-table th {
    background: #2E7D32;
    color: white;
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 600;
}

.docs-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}

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

.docs-table tr:nth-child(even) {
    background: #f9fafb;
}

.docs-table tr:hover {
    background: #f1f8e9;
}

/* ============================================
   Section Header with Icon
   ============================================ */

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #2E7D32;
}

.section-header .icon {
    font-size: 2.5rem;
}

.section-header h1,
.section-header h2 {
    margin: 0;
    padding: 0;
    border: none;
    color: #2E7D32;
}

/* ============================================
   Documentation Cards Grid
   ============================================ */

.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.docs-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.docs-card:hover {
    border-color: #2E7D32;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(46, 125, 50, 0.15);
}

.docs-card h3 {
    color: #2E7D32;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.docs-card p {
    color: #6b7280;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.docs-card .btn-small {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #2E7D32;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.docs-card .btn-small:hover {
    background: #1B5E20;
}

/* ============================================
   Page Header
   ============================================ */

.docs-page-header {
    background: linear-gradient(135deg, #2E7D32 0%, #4CAF50 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    text-align: center;
}

.docs-page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    color: white;
    border: none;
    padding: 0;
}

.docs-page-header p {
    font-size: 1.25rem;
    opacity: 0.95;
    color: white;
    margin: 0;
}
