
/* ═══════════════════════════════════════════════════════════════════
   IA-Café API Documentation Styles
   Version: 1.0.0
   ═══════════════════════════════════════════════════════════════════ */

/* CSS Variables */
:root {
    --primary: #0ea5a0;
    --primary-dark: #065f46;
    --primary-light: rgba(14, 165, 160, 0.1);
    --secondary: #f59e0b;
    --bg-dark: #0b1220;
    --bg-card: #111827;
    --bg-code: #1e293b;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--text);
}

/* ═══════════════════════════════════════════════════════════════════
   Sidebar Navigation
   ═══════════════════════════════════════════════════════════════════ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: 20px 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 0 20px 25px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
}

.sidebar-logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: white;
}

.sidebar-logo-text {
    font-weight: 700;
    font-size: 18px;
}

.sidebar-logo-text span {
    color: var(--primary);
}

.sidebar-version {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

/* Navigation */
.sidebar-nav {
    padding: 0 10px;
}

.nav-section {
    margin-bottom: 25px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    padding: 8px 15px;
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all 0.2s;
    margin-bottom: 2px;
}

.nav-link:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.nav-link.active {
    background: var(--primary-light);
    color: var(--primary);
    border-left: 3px solid var(--primary);
    font-weight: 500;
}

.nav-link i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 200;
    box-shadow: var(--shadow);
}

/* ═══════════════════════════════════════════════════════════════════
   Main Content
   ═══════════════════════════════════════════════════════════════════ */
.main {
    margin-left: 280px;
    padding: 40px 60px;
    max-width: 1100px;
}

/* Page Header */
.page-header {
    margin-bottom: 50px;
}

.page-title {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--text), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 600px;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb span {
    color: var(--text-muted);
}

.breadcrumb .current {
    color: var(--primary);
}

/* ═══════════════════════════════════════════════════════════════════
   Sections
   ═══════════════════════════════════════════════════════════════════ */
.section {
    margin-bottom: 60px;
}

.section-title {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-content {
    color: var(--text-muted);
    font-size: 15px;
}

.section-content p {
    margin-bottom: 15px;
}

.section-content ul,
.section-content ol {
    padding-left: 25px;
    margin-bottom: 15px;
}

.section-content li {
    margin-bottom: 8px;
}

/* ═══════════════════════════════════════════════════════════════════
   Cards
   ═══════════════════════════════════════════════════════════════════ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.card-title .icon {
    font-size: 20px;
}

/* Info Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all 0.3s;
}

.info-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.info-card-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 15px;
}

.info-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.info-card-text {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════════
   Code Blocks
   ═══════════════════════════════════════════════════════════════════ */
.code-block {
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 15px 0;
}

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

.code-lang {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.code-copy {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.code-copy:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.code-copy.copied {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.code-content {
    padding: 15px 20px;
    overflow-x: auto;
}

pre {
    margin: 0;
    font-family: 'Fira Code', 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-wrap: break-word;
}

code {
    font-family: 'Fira Code', 'JetBrains Mono', monospace;
}

.inline-code {
    background: var(--bg-code);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--secondary);
    font-family: 'Fira Code', monospace;
}

/* Syntax Highlighting */
.string { color: #a5d6ff; }
.number { color: #79c0ff; }
.boolean { color: #ff7b72; }
.null { color: #ff7b72; }
.key { color: #7ee787; }
.comment { color: #8b949e; font-style: italic; }
.keyword { color: #ff7b72; }
.function { color: #d2a8ff; }

/* ═══════════════════════════════════════════════════════════════════
   Endpoint Display
   ═══════════════════════════════════════════════════════════════════ */
.endpoint-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-code);
    padding: 15px 20px;
    border-radius: var(--radius-sm);
    margin: 15px 0;
    font-family: 'Fira Code', monospace;
    font-size: 15px;
    border: 1px solid var(--border);
}

.endpoint-url {
    color: var(--text);
    flex: 1;
}

/* Method Badges */
.method {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Fira Code', monospace;
    text-transform: uppercase;
}

.method-get {
    background: rgba(59, 130, 246, 0.2);
    color: var(--info);
}

.method-post {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.method-put {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.method-delete {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

/* ═══════════════════════════════════════════════════════════════════
   Tables
   ═══════════════════════════════════════════════════════════════════ */
.table-wrapper {
    overflow-x: auto;
    margin: 15px 0;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th, td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--bg-code);
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

td {
    color: var(--text-muted);
}

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

tr:hover td {
    background: rgba(14, 165, 160, 0.05);
}

.required {
    color: var(--error);
    font-weight: 600;
    font-size: 11px;
}

.optional {
    color: var(--text-muted);
    font-size: 11px;
}

/* ═══════════════════════════════════════════════════════════════════
   Badges
   ═══════════════════════════════════════════════════════════════════ */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.badge-error {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.badge-info {
    background: rgba(59, 130, 246, 0.2);
    color: var(--info);
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary);
}

/* ═══════════════════════════════════════════════════════════════════
   Alerts / Callouts
   ═══════════════════════════════════════════════════════════════════ */
.alert {
    padding: 18px 22px;
    border-radius: var(--radius);
    margin: 20px 0;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.alert-icon {
    font-size: 22px;
    flex-shrink: 0;
    line-height: 1;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text);
}

.alert-text {
    font-size: 14px;
    line-height: 1.6;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ═══════════════════════════════════════════════════════════════════
   Tabs
   ═══════════════════════════════════════════════════════════════════ */
.tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
    overflow-x: auto;
}

.tab {
    padding: 10px 18px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: all 0.2s;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.tab:hover {
    background: var(--primary-light);
    color: var(--text);
}

.tab.active {
    background: var(--bg-code);
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 0;
}

.tab-content.active {
    display: block;
}

.tab-content .code-block {
    margin: 0;
    border: none;
    border-radius: 0 0 var(--radius) var(--radius);
}

/* ═══════════════════════════════════════════════════════════════════
   Steps / Process
   ═══════════════════════════════════════════════════════════════════ */
.steps {
    margin: 25px 0;
}

.step {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    position: relative;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 19px;
    top: 45px;
    bottom: -15px;
    width: 2px;
    background: var(--border);
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
    padding-top: 5px;
}

.step-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.step-text {
    color: var(--text-muted);
    font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════════════
   Flow Diagram
   ═══════════════════════════════════════════════════════════════════ */
.flow-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 35px 20px;
    background: var(--bg-code);
    border-radius: var(--radius);
    margin: 25px 0;
    flex-wrap: wrap;
    border: 1px solid var(--border);
}

.flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.flow-icon {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.flow-label {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    max-width: 90px;
    line-height: 1.4;
}

.flow-arrow {
    font-size: 28px;
    color: var(--primary);
}

/* ═══════════════════════════════════════════════════════════════════
   Status Codes
   ═══════════════════════════════════════════════════════════════════ */
.status-code {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Fira Code', monospace;
}

.status-code.success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.status-code.error {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.status-code.processing {
    background: rgba(59, 130, 246, 0.2);
    color: var(--info);
}

/* ═══════════════════════════════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════════════════════════════ */
.docs-footer {
    margin-top: 80px;
    padding: 30px 0;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 14px;
}

.docs-footer a {
    color: var(--primary);
}

.footer-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 20px;
}

.footer-nav-item {
    flex: 1;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.2s;
    text-decoration: none;
}

.footer-nav-item:hover {
    border-color: var(--primary);
}

.footer-nav-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.footer-nav-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ═══════════════════════════════════════════════════════════════════
   Landing Page Specific
   ═══════════════════════════════════════════════════════════════════ */
.hero-section {
    text-align: center;
    padding: 60px 0 80px;
}

.hero-title {
    font-size: 52px;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--text), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 35px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Endpoint Cards */
.endpoints-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.endpoint-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 25px;
    text-decoration: none;
    transition: all 0.3s;
    display: block;
}

.endpoint-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.endpoint-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.endpoint-card-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.endpoint-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.endpoint-card-method {
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'Fira Code', monospace;
}

.endpoint-card-text {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════════
   Scrollbar
   ═══════════════════════════════════════════════════════════════════ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ═══════════════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main {
        margin-left: 0;
        padding: 30px 20px;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .page-title {
        font-size: 32px;
    }

    .hero-title {
        font-size: 36px;
    }

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

@media (max-width: 640px) {
    .page-title {
        font-size: 28px;
    }

    .section-title {
        font-size: 22px;
    }

    .flow-diagram {
        padding: 20px 15px;
        gap: 10px;
    }

    .flow-icon {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }

    .flow-arrow {
        font-size: 20px;
    }

    .endpoint-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .tabs {
        flex-wrap: nowrap;
    }

    .tab {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* Utilities */
.text-primary { color: var(--primary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--success) !important; }
.text-error { color: var(--error) !important; }
.text-warning { color: var(--warning) !important; }

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

.hidden { display: none !important; }

/* Overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.sidebar-overlay.show {
    display: block;
}

/* Loading State */
.loading-skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-code) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
