.hero {
    background: linear-gradient(125deg, #0f172a 0%, #1e3a5f 50%, #1e40af 100%);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 2rem 2rem 1.75rem;
    border: 1px solid #334155;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 1.85rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.hero p {
    color: #cbd5e1;
    max-width: 880px;
    font-size: 0.98rem;
}

.meta-strip {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    padding: 0.25rem 0.65rem;
    font-size: 0.74rem;
    background: rgba(255, 255, 255, 0.08);
}

.hero-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.hero-kpi {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.75rem;
}

.hero-kpi .label {
    font-size: 0.7rem;
    color: #94a3b8;
}

.hero-kpi .value {
    font-weight: 700;
    margin-top: 0.15rem;
    font-size: 0.95rem;
}

section {
    margin-bottom: 2.25rem;
}

section[hidden] {
    display: none !important;
}

.card {
    background: var(--doc-surface);
    border: 1px solid var(--doc-border);
    border-radius: var(--radius-lg);
    padding: 1.15rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.alert {
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    margin: 1rem 0;
    border-left: 4px solid;
    font-size: 0.9rem;
}

.alert.info {
    background: var(--info-bg);
    color: #1e40af;
    border-color: var(--info-border);
}

.alert.warn {
    background: var(--warn-bg);
    color: #92400e;
    border-color: var(--warn-border);
}

.alert.ok {
    background: var(--ok-bg);
    color: #065f46;
    border-color: var(--ok-border);
}

.doc-table-wrap {
    overflow-x: auto;
    margin: 0.6rem 0 1rem;
    border: 1px solid var(--doc-border);
    border-radius: var(--radius-md);
    background: var(--doc-surface);
}

.doc-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.doc-table th, .doc-table td {
    border-bottom: 1px solid var(--doc-border);
    text-align: left;
    vertical-align: top;
    padding: 0.65rem 0.75rem;
    font-size: 0.86rem;
}

.doc-table th {
    background: #f1f5f9;
    color: #0f172a;
    font-weight: 600;
}

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

.tag {
    display: inline-block;
    border-radius: 6px;
    padding: 0.1rem 0.45rem;
    font-size: 0.68rem;
    font-weight: 700;
    background: var(--chip-bg);
    border: 1px solid var(--chip-border);
    color: #1d4ed8;
}

.endpoint {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    margin-bottom: 0.45rem;
}

.method {
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    padding: 0.12rem 0.4rem;
    text-transform: uppercase;
    font-family: var(--font-mono);
}

.get { background: #d1fae5; color: #065f46; }
.post { background: #dbeafe; color: #1e40af; }
.put { background: #fef3c7; color: #92400e; }
.delete { background: #fee2e2; color: #991b1b; }

.tree {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.7;
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    color: #94a3b8;
    overflow-x: auto;
    white-space: pre;
    position: relative;
}

.tree .folder { color: #60a5fa; font-weight: 500; }
.tree .file { color: #a5b4fc; }
.tree .note { color: #64748b; font-style: italic; }
.tree .pipe { color: #475569; }
.tree .arrow { color: #60a5fa; }
.tree .tag { 
    background: rgba(96, 165, 250, 0.15);
    color: #93c5fd;
    border-radius: 4px;
    padding: 0.1rem 0.3rem;
    font-size: 0.75em;
}

.media-placeholder {
    min-height: 140px;
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-lg);
    background: #f8fafc;
    color: #64748b;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1rem;
    font-size: 0.85rem;
}

.media-placeholder.large { min-height: 180px; }

.placeholder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.doc-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--doc-border);
    font-size: 0.85rem;
    color: var(--doc-muted);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--doc-muted);
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    color: var(--doc-accent);
}

.breadcrumb span {
    color: #94a3b8;
}

.page-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--doc-border);
}

.page-nav-link {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: var(--doc-surface);
    border: 1px solid var(--doc-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    max-width: 45%;
}

.page-nav-link:hover {
    border-color: var(--doc-accent);
    box-shadow: var(--shadow-sm);
}

.page-nav-link.prev { align-items: flex-start; }
.page-nav-link.next { align-items: flex-end; margin-left: auto; }

.page-nav-link .label {
    font-size: 0.72rem;
    color: var(--doc-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.page-nav-link .title {
    font-weight: 600;
    color: var(--doc-text);
    font-size: 0.9rem;
}

.toc {
    background: var(--doc-surface);
    border: 1px solid var(--doc-border);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.toc h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: var(--doc-text);
}

.toc ul {
    margin: 0;
    padding-left: 1rem;
}

.toc li {
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
}