.nowl-ai-chat-page.app-portal__body {
    .nowl-chat-page {
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .nowl-chatbox {
        background: var(--global-palette9);
        border-radius: 0.5rem;
        border: 1px solid var(--outline-color);
        overflow: hidden;
        display: flex;
        flex-direction: column;
        font-family: system-ui, sans-serif;
        width: 100%;
        max-width: 650px;
        margin: 2rem auto;
        flex-grow: 1;
    }

    .nowl-messages {
        display: flex;
        flex-direction: column;
        padding: 1rem;
        flex: 1;
        overflow-y: auto;
        border-bottom: 1px solid var(--outline-color);
    }

    .msg {
        margin-bottom: .75rem;
        padding: .5rem .75rem;
        border-radius: .75rem;
        max-width: 85%;
        line-height: 1.3;
        word-wrap: break-word;

        p:first-child {
            margin-top: 0;
        }

        p:last-child {
            margin-bottom: 0;
        }
    }

    .msg.user {
        background: var(--green);
        align-self: flex-end;
    }

    .msg.bot {
        background: var(--blue-component);
        align-self: flex-start;
    }

    .nowl-input-wrapper {
        display: flex;
        padding: 1rem;
        gap: 1rem;
        background: var(--global-palette8);
    }

    .nowl-actions {
        display: flex;
        gap: 0.5rem;
    }

    /* --- Action confirmation UI --- */
    .nowl-action-confirm {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        background: #f9fafb;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 6px 10px;
        margin-top: 8px;
    }

    .nowl-action-label {
        font-size: 0.85rem;
        color: #555;
    }

    .nowl-btn-confirm,
    .nowl-btn-cancel {
        border: none;
        border-radius: 6px;
        padding: 4px 8px;
        cursor: pointer;
        font-size: 0.85rem;
    }

    .nowl-btn-confirm {
        background: #007cba;
        color: #fff;
    }

    .nowl-btn-cancel {
        background: transparent;
        border: 1px solid #ccc;
        color: #444;
    }

    /* --- Debug raw line --- */
    .nowl-debug-raw {
        background: #f5f5f5;
        border-left: 3px solid #007cba;
        color: #555;
        font-size: 0.8rem;
        padding: 6px 8px;
        margin: 6px 0 0 0;
        border-radius: 4px;
        white-space: pre-wrap;
    }

    .nowl-action-confirm.disabled {
        opacity: 0.5;
        pointer-events: none;
    }
    .nowl-action-confirm.disabled button {
        cursor: not-allowed;
    }

    /* --- Error banner --- */
    .nowl-error {
        background: var(--error-background);
        border: 1px solid var(--error-border);
        color: var(--global-palette5);
        border-radius: 6px;
        padding: 8px 10px;
        margin: 0.5rem auto;
        max-width: 650px;
        text-align: center;
        font-size: 0.9rem;
        animation: fadeIn 0.2s ease-out;
    }

    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(4px); }
        to { opacity: 1; transform: translateY(0); }
    }

}