.af-kb-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 16px;
    position: relative;
    z-index: 1;
}

.af-kb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.af-kb-btn {
    display: inline-block;
    padding: 8px 14px;
    background: #4462b2;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
}

.af-kb-btn:hover {
    background: #2f4e96;
}

.af-kb-btn--create {
    background: #2f8a5d;
}

.af-kb-btn--create:hover {
    background: #276f4c;
}

.af-kb-btn--edit {
    background: #4462b2;
}

.af-kb-btn--edit:hover {
    background: #2f4e96;
}

.af-kb-btn--delete {
    background: #b23b3b;
}

.af-kb-btn--delete:hover {
    background: #922f2f;
}

.af-kb-btn-create {
    background: #2f8a5d;
}

.af-kb-btn-edit {
    background: #4462b2;
}

.af-kb-btn-delete {
    background: #b23b3b;
}

.af-kb-btn-create:hover {
    background: #276f4c;
}

.af-kb-btn-edit:hover {
    background: #2f4e96;
}

.af-kb-btn-delete:hover {
    background: #922f2f;
}

.af-kb-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.af-kb-delete-form {
    display: inline-flex;
    margin: 0;
}

.af-kb-help-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f2f5ff;
    color: #4462b2;
    text-decoration: none;
}

.af-kb-help-link:hover {
    background: #e5ebff;
}

.af-kb-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.af-kb-tab {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #dcdfe6;
    background: #fff;
    text-decoration: none;
    color: inherit;
    min-width: 200px;
}

.af-kb-tab--with-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.af-kb-type-header,
.af-kb-entry-header {
    padding: 8px 12px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
}

.af-kb-entry--with-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.af-kb-tab:hover {
    border-color: #4462b2;
    box-shadow: 0 2px 8px rgba(68, 98, 178, 0.12);
}

.af-kb-tab.is-active {
    border-color: #4462b2;
    background: #f2f5ff;
}

.af-kb-tab-title {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.af-kb-tab-desc {
    color: #555;
    font-size: 0.92em;
}

.af-kb-type,
.af-kb-entry,
.af-kb-block,
.af-kb-rel-group {
    background: #fff;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    padding: 14px;
    margin-bottom: 16px;
}

.af-kb-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
}

.af-kb-icon-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: block;
}

.af-kb-type-desc,
.af-kb-entry-short,
.af-kb-block-content,
.af-kb-body {
    color: #444;
    line-height: 1.6;
    font-family: inherit;
    font-weight: normal;
    letter-spacing: normal;
    text-shadow: none;
    mix-blend-mode: normal;
    filter: none;
    -webkit-text-security: none;
    -webkit-mask-image: none;
    mask-image: none;
}

.af-kb-tech-note {
    border-left: 3px solid #d0d6e4;
    padding: 10px 12px;
    margin: 0 0 16px;
    background: #f9fafc;
    border-radius: 6px;
}

.af-kb-tech-note .af-kb-tech-icon {
    display: inline-flex;
    align-items: center;
    margin-right: 8px;
}

.af-kb-tech-note .af-kb-tech-icon i,
.af-kb-tech-note .af-kb-tech-icon img {
    width: 18px;
    height: 18px;
}

.af-kb-breadcrumbs {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 6px;
}

.af-kb-breadcrumbs a {
    color: inherit;
    text-decoration: none;
}

.af-kb-breadcrumbs a:hover {
    text-decoration: underline;
}

.af-kb-search {
    margin-bottom: 16px;
}

.af-kb-search input[type="text"] {
    width: 100%;
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid #ccd2dd;
}

.af-kb-help {
    font-size: 0.9em;
    color: #56607a;
    margin-top: 6px;
}

.af-kb-help p {
    margin: 6px 0;
}

.af-kb-code {
    background: #f5f7fb;
    border: 1px solid #d5d9e2;
    padding: 10px;
    border-radius: 6px;
    margin: 8px 0 12px;
}

.af-kb-code pre {
    margin: 0;
    font-family: ui-monospace, SFMono-Regular, SFMono, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.9em;
    white-space: pre-wrap;
}

.af-kb-form section {
    margin-bottom: 20px;
    padding: 12px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    background: #fff;
}

.af-kb-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.af-kb-form input[type="text"],
.af-kb-form textarea,
.af-kb-form select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid #ccd2dd;
    margin-bottom: 12px;
}

.af-kb-form textarea {
    min-height: 120px;
}

.af-kb-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.af-kb-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.af-kb-inline--align {
    align-items: flex-start;
}

.af-kb-inline--align textarea {
    flex: 1;
    margin-bottom: 0;
}

.af-kb-block-item,
.af-kb-rel-item-edit {
    border: 1px dashed #c0c6d4;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    background: #f9fafc;
}

.af-kb-remove {
    background: #b23b3b;
    color: #fff;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.af-kb-add {
    background: #2f8a5d;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.af-kb-errors {
    background: #ffecec;
    border: 1px solid #ffb0b0;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.af-kb-data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.af-kb-data-table th,
.af-kb-data-table td {
    border: 1px solid #d5d9e2;
    padding: 6px 8px;
    text-align: left;
}

.af-kb-rel-group ul {
    margin: 0;
    padding-left: 18px;
}

.af-kb-rel-group li {
    margin: 4px 0;
}

.af-kb-pagination {
    margin-top: 16px;
}

.af-kb-tech {
    background: #f7f9ff;
    border: 1px solid #d5d9e2;
    border-radius: 6px;
    padding: 10px 12px;
    margin: 12px 0;
}

.af-kb-tech summary {
    font-weight: 600;
    cursor: pointer;
}

.af-kb-copy-json {
    margin: 8px 0;
    padding: 6px 10px;
    border: 1px solid #ccd2dd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

.af-kb-help-page section {
    background: #fff;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 16px;
}