:root {
    --primary: #ea580c;
    --primary-dark: #c2410c;
    --header-bg: #1e293b;
    --text: #334155;
    --border: #e2e8f0;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background: #f8fafc;
}

.api-header {
    background: var(--header-bg);
    color: #fff;
    border-bottom: 3px solid var(--primary);
}

.api-header-inner {
    max-width: 1460px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.api-brand {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.api-logo,
.api-logo-link {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}

.api-subtitle {
    font-size: 0.95rem;
    color: #94a3b8;
}

.api-nav a {
    color: #cbd5e1;
    text-decoration: none;
    margin-left: 1rem;
    font-size: 0.9rem;
}

.api-nav a:hover {
    color: #fff;
}

#swagger-ui {
    max-width: 1460px;
    margin: 0 auto;
    padding: 0 1rem 2rem;
}

.api-footer {
    text-align: center;
    padding: 1.5rem;
    color: #64748b;
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
    background: #fff;
}

/* Swagger UI overrides — stile simile a portali API enterprise */
.swagger-ui .topbar {
    display: none;
}

.swagger-ui .info .title {
    color: var(--header-bg);
}

.swagger-ui .opblock.opblock-post {
    border-color: var(--primary);
    background: rgba(234, 88, 12, 0.05);
}

.swagger-ui .opblock.opblock-post .opblock-summary-method {
    background: var(--primary);
}

.swagger-ui .opblock.opblock-get .opblock-summary-method {
    background: #2563eb;
}

.swagger-ui .btn.authorize {
    border-color: var(--primary);
    color: var(--primary);
}

.swagger-ui .btn.authorize svg {
    fill: var(--primary);
}

.swagger-ui .btn.execute {
    background: var(--primary);
    border-color: var(--primary);
}

.swagger-ui .btn.execute:hover {
    background: var(--primary-dark);
}

/* Tutorial page */
.tutorial-page {
    background: #fff;
}

.tutorial-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
    line-height: 1.65;
}

.tutorial-content h1 {
    color: var(--header-bg);
    margin-top: 0;
}

.tutorial-content h2 {
    color: var(--header-bg);
    margin-top: 2.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid var(--primary);
}

.tutorial-content h3 {
    margin-top: 1.5rem;
}

.tutorial-content .lead {
    font-size: 1.05rem;
    color: #475569;
}

.tutorial-content pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.88rem;
    line-height: 1.5;
}

.tutorial-content code {
    font-family: Consolas, Monaco, monospace;
}

.tutorial-content p code,
.tutorial-content li code {
    background: #f1f5f9;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    color: #0f172a;
}

.tutorial-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.tutorial-table th,
.tutorial-table td {
    border: 1px solid var(--border);
    padding: 0.65rem 0.85rem;
    text-align: left;
}

.tutorial-table th {
    background: #f1f5f9;
}

.tutorial-content a {
    color: var(--primary);
}

@media (max-width: 640px) {
    .api-nav a {
        margin-left: 0.5rem;
    }

    .tutorial-content {
        padding: 1.25rem 1rem 2rem;
    }
}
