.content:has(.rfc-page),
fluent-body-content:has(.rfc-page) {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.rfc-title {
    text-align: center;
    margin: 20px 0 0 0;
}

.rfc-page {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 1200px;
    min-width: 0;
    margin: 20px auto;
    padding: 0 16px 40px;
    box-sizing: border-box;
    overflow-x: hidden;
}

.rfc-page fluent-select,
.rfc-page fluent-text-field,
.rfc-page fluent-text-area,
.rfc-page fluent-button,
.rfc-page fluent-message-bar {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.rfc-toolbar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: end;
    width: 100%;
    margin-bottom: 16px;
}

.rfc-filter {
    width: 220px;
    max-width: 100%;
    min-width: 0;
}

.rfc-search {
    flex: 1 1 220px;
    min-width: 0;
}

.rfc-reload {
    flex: 0 0 auto;
}

.rfc-hint {
    width: 100%;
    margin-bottom: 12px;
    padding: 10px 14px;
    background: #f3f6f9;
    border-radius: 6px;
    font-size: 13px;
    color: #444;
    line-height: 1.5;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.rfc-status {
    width: 100%;
    margin-bottom: 16px;
}

.rfc-body {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    width: 100%;
    min-width: 0;
}

.rfc-nav {
    position: sticky;
    top: 12px;
    flex: 0 0 200px;
    max-height: calc(100vh - 40px);
    overflow: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    background: #fff;
    box-sizing: border-box;
    min-width: 0;
}

.rfc-nav-title {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.rfc-nav-empty {
    font-size: 12px;
    color: #888;
}

.rfc-nav-btn {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    padding: 8px 10px;
    margin-bottom: 4px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #222;
    box-sizing: border-box;
}

.rfc-nav-btn.is-active {
    background: #e8f4ff;
}

.rfc-nav-btn-count {
    display: block;
    font-size: 11px;
    color: #888;
}

.rfc-main {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
}

.rfc-section {
    margin-bottom: 28px;
}

.rfc-section-title {
    margin: 0 0 12px 0;
    padding: 8px 12px;
    background: #f3f6f9;
    border-radius: 6px;
    border-left: 4px solid #0078d4;
    overflow-wrap: anywhere;
}

.rfc-section-count {
    font-size: 13px;
    font-weight: 400;
    color: #666;
    margin-left: 8px;
}

.rfc-item {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    background: #fafafa;
    box-sizing: border-box;
    min-width: 0;
}

.rfc-item-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.rfc-item-label {
    font-weight: 600;
    overflow-wrap: anywhere;
}

.rfc-item-meta {
    font-size: 12px;
    color: #666;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.rfc-editor {
    width: 100%;
    min-width: 0;
}

.rfc-page fluent-text-area {
    width: 100%;
}

.rfc-item-actions {
    text-align: end;
    margin-top: 10px;
}

.rfc-empty {
    text-align: center;
    color: #666;
    padding: 40px 0;
}

.rfc-denied {
    width: 100%;
    text-align: center;
    font-weight: 400;
    margin-top: 30px;
}

@media (max-width: 800px) {
    .content:has(.rfc-page) {
        padding-left: 0.7rem;
        padding-right: 0.7rem;
    }

    .rfc-page {
        padding: 0 0 32px;
        margin-top: 12px;
    }

    .rfc-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .rfc-filter,
    .rfc-search,
    .rfc-reload {
        width: 100%;
        flex: 1 1 auto;
    }

    .rfc-filter fluent-select,
    .rfc-search fluent-text-field,
    .rfc-reload fluent-button {
        width: 100% !important;
    }

    .rfc-page fluent-text-field,
    .rfc-page fluent-text-area,
    .rfc-page fluent-select {
        font-size: 16px;
    }

    .rfc-body {
        flex-direction: column;
    }

    .rfc-nav {
        position: sticky;
        top: 0;
        z-index: 4;
        flex: none;
        width: 100%;
        max-height: none;
        overflow: visible;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        padding: 10px;
    }

    .rfc-nav-title {
        width: 100%;
        margin-bottom: 0;
    }

    .rfc-nav-btn {
        width: auto;
        display: inline-flex;
        align-items: baseline;
        gap: 6px;
        margin: 0;
        white-space: nowrap;
        border: 1px solid #d8d8d8;
        background: #fff;
        min-height: 36px;
    }

    .rfc-nav-btn.is-active {
        border-color: #0078d4;
    }

    .rfc-nav-btn-count {
        display: inline;
    }

    .rfc-item {
        padding: 12px;
    }

    .rfc-item-head fluent-button,
    .rfc-item-actions fluent-button {
        width: 100%;
    }

    .rfc-item-actions {
        text-align: left;
    }

    .rfc-section-count {
        display: inline-block;
        margin-left: 0;
        margin-top: 2px;
    }
}
