/* NFA Chat UI — Chronicler + Scholar */
.nfa-chat-widget {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(30,40,85,.12);
    border-radius: 12px;
    overflow: hidden;
    font-family: 'Barlow', sans-serif;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
    max-width: 100%;
    width: 100%;
}
.nfa-chat-header {
    background: #1e2855;
    color: #fafaf7;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.nfa-chat-avatar {
    width: 36px;
    height: 36px;
    background: rgba(232,200,74,.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #e8c84a;
    flex-shrink: 0;
}
.nfa-chat-identity strong {
    display: block;
    font-size: .95rem;
    font-weight: 700;
}
.nfa-chat-identity span {
    font-size: .72rem;
    opacity: .65;
    font-family: 'DM Mono', monospace;
}
.nfa-chat-status {
    margin-left: auto;
    font-size: .72rem;
    opacity: .65;
    font-family: 'DM Mono', monospace;
    font-style: italic;
}
.nfa-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #fafaf7;
}
.nfa-chat-msg {
    max-width: 88%;
}
.nfa-chat-msg p {
    margin: 0;
    font-size: .88rem;
    line-height: 1.55;
    padding: 10px 14px;
    border-radius: 10px;
}
.nfa-msg-assistant p {
    background: #f0f4ff;
    color: #1e2855;
    border-bottom-left-radius: 3px;
}
.nfa-msg-user {
    align-self: flex-end;
}
.nfa-msg-user p {
    background: #1e2855;
    color: #fafaf7;
    border-bottom-right-radius: 3px;
}
.nfa-chat-input-row {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid rgba(30,40,85,.1);
    background: #fff;
    align-items: flex-end;
}
.nfa-chat-input-row textarea {
    flex: 1;
    resize: none;
    border: 1px solid rgba(30,40,85,.2);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: .85rem;
    font-family: 'Barlow', sans-serif;
    color: #1e2855;
    outline: none;
}
.nfa-chat-input-row textarea:focus {
    border-color: #1e2855;
}
.nfa-chat-send-btn {
    background: #1e2855;
    color: #e8c84a;
    border: none;
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nfa-chat-send-btn:hover { background: #2d3b7a; }
.nfa-chronicler-widget { /* inherits */ }
