.chatHistoryElStyle {
    overflow-y: auto;
    max-height: 70vh;
    padding: 10px;
    background-color: var(--background-secondary);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.personasInfoStyle {
    font-size: 12px;
    font-style: italic;
    opacity: 0.7;
    margin-bottom: 20px;
    color: var(--text-muted);
}

.llmChatMessageStyleUser { 
    border-radius: 18px;
    background-color: var(--interactive-accent);
    color: var(--text-on-accent);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 15px;
    margin-left: 20px;
    user-select: text;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    max-width: 80%;
}

.llmChatMessageStyleAI {
    position: relative;
    padding: 12px 16px;
    border-radius: 18px;
    background-color: var(--background-secondary);
    color: var(--text-normal);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    margin-bottom: 15px;
    margin-right: 20px;
    user-select: text;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    max-width: 80%;
}

.copy-button {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 2px;
    opacity: 0.5;
    transition: opacity 0.2s ease-in-out;
}

.copy-button:hover {
    opacity: 1;
}

.copy-button svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.thinking-indicator {
    display: inline-block;
    margin-bottom: 15px;
    padding: 8px 12px;
    background-color: var(--background-secondary);
    border-radius: 12px;
    font-size: 14px;
    color: var(--text-muted);
}

.thinking-indicator span {
    margin-left: 4px;
}

.dots {
    display: inline-block;
    position: relative;
}

.dot {
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--text-muted);
    margin-right: 2px;
    animation: blink 1.5s infinite;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

.llm-chat-modal {
    display: flex;
    flex-direction: column;
    height: 100%;
    font-family: var(--font-interface);
}

.llm-chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: var(--background-primary);
}

.llm-chat-history {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb-bg) var(--scrollbar-bg);
}

.llm-chat-history::-webkit-scrollbar {
    width: 8px;
}

.llm-chat-history::-webkit-scrollbar-track {
    background: var(--scrollbar-bg);
}

.llm-chat-history::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb-bg);
    border-radius: 4px;
}

.llm-chat-input-container {
    padding: 15px;
    background-color: var(--background-secondary);
    border-top: 1px solid var(--background-modifier-border);
}

.llm-chat-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.llm-chat-ask-label {
    flex-shrink: 0;
    font-weight: 600;
    color: var(--text-muted);
}

.llm-chat-input {
    flex-grow: 1;
    padding: 10px 15px;
    border-radius: 20px;
    border: 1px solid var(--background-modifier-border);
    background-color: var(--background-primary);
    color: var(--text-normal);
    font-size: 14px;
    transition: all 0.3s ease;
}

.llm-chat-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--interactive-accent);
}

.llm-chat-submit-button {
    flex-shrink: 0;
    padding: 8px 16px;
    border-radius: 20px;
    background-color: var(--interactive-accent);
    color: var(--text-on-accent);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.llm-chat-submit-button:hover:not(.llm-chat-submit-button-disabled) {
    background-color: var(--interactive-accent-hover);
}

.llm-chat-submit-button-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.llm-chat-submit-button-disabled:hover {
    background-color: var(--interactive-accent);
}

.chatInputContainer {
    display: flex;
    padding: 10px;
    background-color: var(--background-primary);
    border-top: 1px solid var(--background-modifier-border);
}

.chatInputStyle {
    flex: 1;
    padding: 10px;
    border-radius: 20px;
    border: 1px solid var(--background-modifier-border);
    background-color: var(--background-primary);
    color: var(--text-normal);
    font-size: 14px;
    transition: all 0.3s ease;
}

.chatInputStyle:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--interactive-accent);
}

.submitButton {
    margin-left: 10px;
    padding: 10px 20px;
    border-radius: 20px;
    background-color: var(--interactive-accent);
    color: var(--text-on-accent);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submitButton:hover {
    background-color: var(--interactive-accent-hover);
}

/* Prompt Picker Modal */
.prompt-picker-modal {
    padding: 20px;
}

.prompt-picker-modal h2 {
    margin-top: 0;
    margin-bottom: 8px;
}

.prompt-picker-description {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.prompt-presets-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.prompt-preset-button {
    padding: 8px 14px;
    border-radius: 16px;
    border: 1px solid var(--background-modifier-border);
    background-color: var(--background-secondary);
    color: var(--text-normal);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.prompt-preset-button:hover {
    background-color: var(--interactive-accent);
    color: var(--text-on-accent);
    border-color: var(--interactive-accent);
}

.prompt-picker-modal h3 {
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-muted);
}

.prompt-custom-input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--background-modifier-border);
    background-color: var(--background-primary);
    color: var(--text-normal);
    font-size: 14px;
    resize: vertical;
    margin-bottom: 12px;
    font-family: var(--font-interface);
}

.prompt-custom-input:focus {
    outline: none;
    border-color: var(--interactive-accent);
    box-shadow: 0 0 0 2px rgba(var(--interactive-accent-rgb), 0.2);
}

/* Update Notice Modal */
.llm-update-modal {
    padding: 20px;
    max-width: 500px;
}

.llm-update-modal h2 {
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--background-modifier-border);
}

.llm-changelog-current {
    margin-bottom: 16px;
}

.llm-changelog-current p {
    margin: 4px 0;
}

.llm-changelog-current strong {
    color: var(--text-accent);
}

.llm-changelog-current ul {
    margin: 4px 0 12px 0;
    padding-left: 20px;
}

.llm-changelog-current li {
    margin: 4px 0;
}

.llm-changelog-previous {
    margin: 16px 0;
    padding: 12px;
    background-color: var(--background-secondary);
    border-radius: 8px;
}

.llm-changelog-previous summary {
    cursor: pointer;
    font-weight: 500;
    color: var(--text-muted);
    user-select: none;
}

.llm-changelog-previous summary:hover {
    color: var(--text-normal);
}

.llm-changelog-previous[open] summary {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--background-modifier-border);
}

.llm-changelog-version {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--background-modifier-border);
}

.llm-changelog-version:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.llm-changelog-version h4 {
    margin: 0 0 8px 0;
    color: var(--text-muted);
    font-size: 13px;
}

.llm-changelog-version p {
    margin: 4px 0;
    font-size: 13px;
}

.llm-changelog-version ul {
    margin: 4px 0 8px 0;
    padding-left: 18px;
    font-size: 13px;
}

.llm-changelog-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--background-modifier-border);
}

.llm-changelog-footer .setting-item {
    border: none;
    padding: 0;
}

.llm-changelog-footer .setting-item-control {
    gap: 8px;
}

/* ═══════════════════════════════════════════════════════════════════
   RAG Chat Modal
   ═══════════════════════════════════════════════════════════════════ */

.rag-chat-modal {
    display: flex;
    flex-direction: column;
    height: 70vh;
    max-height: 600px;
    padding: 0;
}

.rag-chat-modal .modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
}

/* Header */
.rag-chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--background-modifier-border);
    background-color: var(--background-secondary);
}

.rag-chat-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background-color: var(--interactive-accent);
    color: var(--text-on-accent);
}

.rag-chat-header-icon svg {
    width: 20px;
    height: 20px;
}

.rag-chat-header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rag-chat-header-text h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.rag-chat-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

.rag-chat-scope-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--background-modifier-border);
    background-color: var(--background-primary);
    flex-wrap: wrap;
}

.rag-chat-scope-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rag-chat-scope-select,
.rag-chat-scope-input {
    border: 1px solid var(--background-modifier-border);
    border-radius: 8px;
    background-color: var(--background-secondary);
    color: var(--text-normal);
    font-size: 13px;
}

.rag-chat-scope-select {
    padding: 6px 10px;
}

.rag-chat-scope-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 220px;
    flex-wrap: wrap;
}

.rag-chat-scope-input-wrap {
    flex: 1;
    min-width: 180px;
}

.rag-chat-scope-input {
    width: 100%;
    padding: 6px 10px;
}

.rag-chat-scope-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.workflow-runner-bar,
.workflow-runner-fields,
.workflow-runner-field-row {
    display: flex;
    gap: 10px;
}

.workflow-runner-bar {
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--background-modifier-border);
    background-color: var(--background-primary);
    flex-wrap: wrap;
}

.workflow-runner-fields {
    flex-direction: column;
    padding: 12px 20px;
    border-bottom: 1px solid var(--background-modifier-border);
    background-color: var(--background-secondary);
}

.workflow-runner-field-row {
    align-items: center;
    flex-wrap: wrap;
}

.workflow-runner-field-row .rag-chat-scope-label {
    min-width: 110px;
}

.workflow-runner-field-row .rag-chat-scope-input {
    flex: 1;
    min-width: 220px;
}

.workflow-runner-helper {
    margin-bottom: 4px;
}

/* Chat container */
.rag-chat-container {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.rag-chat-history {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Welcome message */
.rag-chat-welcome {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.rag-chat-welcome-content {
    max-width: 400px;
    padding: 24px;
    background-color: var(--background-secondary);
    border-radius: 12px;
    text-align: center;
}

.rag-chat-welcome-content p {
    margin: 0 0 16px 0;
    color: var(--text-muted);
    line-height: 1.5;
}

.rag-chat-examples {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rag-chat-examples-label {
    font-size: 12px;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rag-chat-example-btn {
    padding: 8px 12px;
    border: 1px solid var(--background-modifier-border);
    border-radius: 8px;
    background-color: var(--background-primary);
    color: var(--text-normal);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
}

.rag-chat-example-btn:hover {
    border-color: var(--interactive-accent);
    background-color: var(--background-secondary-alt);
}

/* Messages */
.rag-chat-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    line-height: 1.5;
}

.rag-chat-message-user {
    align-self: flex-end;
    background-color: var(--interactive-accent);
    color: var(--text-on-accent);
    border-bottom-right-radius: 4px;
}

.rag-chat-message-ai {
    align-self: flex-start;
    background-color: var(--background-secondary);
    color: var(--text-normal);
    border-bottom-left-radius: 4px;
    position: relative;
}

.rag-chat-message-error {
    align-self: flex-start;
    background-color: rgba(var(--color-red-rgb), 0.1);
    color: var(--text-error);
    border: 1px solid rgba(var(--color-red-rgb), 0.3);
    border-bottom-left-radius: 4px;
}

.rag-chat-response-text {
    margin-bottom: 8px;
}

.rag-chat-response-text p {
    margin: 0 0 8px 0;
}

.rag-chat-response-text p:last-child {
    margin-bottom: 0;
}

.llm-helper-chat-markdown {
    overflow-wrap: anywhere;
}

.llm-helper-chat-markdown > :first-child {
    margin-top: 0;
}

.llm-helper-chat-markdown > :last-child {
    margin-bottom: 0;
}

.llm-helper-chat-markdown pre {
    white-space: pre-wrap;
}

.llm-helper-chat-markdown table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

.rag-chat-badge-row {
    display: flex;
    margin-bottom: 8px;
}

.rag-chat-scope-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background-color: var(--background-modifier-hover);
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* Sources */
.rag-chat-sources {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--background-modifier-border);
}

.rag-chat-sources-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.rag-chat-sources-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rag-chat-source-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.rag-chat-source-item:hover {
    background-color: var(--background-modifier-hover);
}

.rag-chat-source-icon {
    display: flex;
    color: var(--text-muted);
    flex-shrink: 0;
}

.rag-chat-source-icon svg {
    width: 14px;
    height: 14px;
}

.rag-chat-source-name {
    font-size: 12px;
    color: var(--text-accent);
}

.rag-chat-source-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.rag-chat-source-path {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vault-action-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.vault-action-card {
    padding: 12px;
    border: 1px solid var(--background-modifier-border);
    border-radius: 10px;
    background-color: var(--background-primary);
}

.vault-action-header {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 8px;
}

.vault-action-description {
    color: var(--text-muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.vault-action-preview,
.vault-action-debug {
    max-height: 220px;
    overflow: auto;
    margin: 8px 0;
    padding: 10px;
    border-radius: 8px;
    background-color: var(--background-secondary-alt);
    color: var(--text-normal);
    white-space: pre-wrap;
}

.vault-action-status {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 8px;
}

.vault-action-status.is-invalid {
    color: var(--text-error);
}

.vault-action-status.is-approved {
    color: var(--text-success);
}

.vault-action-status.is-rejected {
    color: var(--text-muted);
}

.vault-action-buttons {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.llmChatMessageStyleAI p,
.rag-chat-response-text p {
    margin: 0 0 8px 0;
}

.llmChatMessageStyleAI p:last-child,
.rag-chat-response-text p:last-child {
    margin-bottom: 0;
}

/* Copy button */
.rag-chat-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px;
    border: none;
    border-radius: 4px;
    background-color: transparent;
    color: var(--text-muted);
    cursor: pointer;
    opacity: 0;
    transition: all 0.15s ease;
}

.rag-chat-message-ai:hover .rag-chat-copy-btn {
    opacity: 1;
}

.rag-chat-copy-btn:hover {
    background-color: var(--background-modifier-hover);
    color: var(--text-normal);
}

.rag-chat-copy-btn svg {
    width: 14px;
    height: 14px;
}

/* Thinking indicator */
.rag-chat-thinking {
    align-self: flex-start;
    padding: 12px 16px;
    background-color: var(--background-secondary);
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    color: var(--text-muted);
    font-size: 13px;
}

/* Input area */
.rag-chat-input-container {
    padding: 12px 16px;
    border-top: 1px solid var(--background-modifier-border);
    background-color: var(--background-primary);
}

.rag-chat-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rag-chat-clear-btn {
    padding: 8px;
    border: none;
    border-radius: 8px;
    background-color: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

.rag-chat-clear-btn:hover {
    background-color: var(--background-modifier-hover);
    color: var(--text-normal);
}

.rag-chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--background-modifier-border);
    border-radius: 20px;
    background-color: var(--background-secondary);
    color: var(--text-normal);
    font-size: 14px;
    transition: border-color 0.15s ease;
}

.rag-chat-input:focus {
    outline: none;
    border-color: var(--interactive-accent);
}

.rag-chat-submit-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    background-color: var(--interactive-accent);
    color: var(--text-on-accent);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.rag-chat-submit-btn:hover:not(.rag-chat-submit-disabled) {
    filter: brightness(1.1);
}

.rag-chat-submit-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.llm-helper-chat-content {
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

.llm-helper-chat-view .llm-helper-chat-container {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.llm-helper-chat-header,
.llm-helper-chat-title-wrap,
.llm-helper-chat-mode-toggle,
.llm-helper-chat-input-row {
    display: flex;
}

.llm-helper-chat-header {
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 14px 12px;
    border-bottom: 1px solid var(--background-modifier-border);
    background-color: var(--background-primary);
}

.llm-helper-chat-title-wrap {
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.llm-helper-chat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background-color: var(--background-secondary);
    color: var(--interactive-accent);
    flex-shrink: 0;
}

.llm-helper-chat-icon svg {
    width: 17px;
    height: 17px;
}

.llm-helper-chat-title-text {
    min-width: 0;
}

.llm-helper-chat-title-text h2 {
    margin: 0;
    font-size: 15px;
    line-height: 1.25;
}

.llm-helper-chat-status {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.llm-helper-chat-header-action {
    flex-shrink: 0;
}

.llm-helper-chat-header-action.is-active {
    color: var(--text-accent);
    background-color: var(--background-modifier-hover);
}

.llm-helper-chat-mode-toggle {
    gap: 4px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--background-modifier-border);
    background-color: var(--background-secondary);
}

.llm-helper-chat-mode-toggle button {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: 6px;
    background-color: transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.llm-helper-chat-mode-toggle button.is-active {
    border-color: var(--background-modifier-border);
    background-color: var(--background-primary);
    color: var(--text-normal);
}

.llm-helper-chat-scope {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--background-modifier-border);
    background-color: var(--background-primary);
}

.llm-helper-chat-scope.is-hidden {
    display: none;
}

.llm-helper-chat-scope .rag-chat-scope-label {
    font-size: 11px;
}

.llm-helper-chat-scope .rag-chat-scope-select {
    max-width: 100%;
}

.llm-helper-chat-scope .rag-chat-scope-meta {
    min-width: 160px;
}

.llm-helper-chat-container {
    flex: 1;
    overflow: hidden;
}

.llm-helper-chat-history {
    flex: 1;
    min-height: 0;
    padding: 14px 12px;
}

.llm-helper-chat-history .rag-chat-message {
    max-width: 94%;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
}

.llm-helper-chat-history .rag-chat-message-user {
    border-bottom-right-radius: 4px;
}

.llm-helper-chat-history .rag-chat-message-ai {
    border-bottom-left-radius: 4px;
}

.llm-helper-chat-empty {
    margin: auto 0;
    padding: 16px;
    border: 1px dashed var(--background-modifier-border);
    border-radius: 8px;
    background-color: var(--background-secondary);
    color: var(--text-muted);
    text-align: center;
    font-size: 13px;
    line-height: 1.4;
}

.llm-helper-chat-input-container {
    padding: 10px 12px 34px;
    border-top: 1px solid var(--background-modifier-border);
    background-color: var(--background-primary);
    box-shadow: 0 -8px 18px rgba(0, 0, 0, 0.08);
}

.llm-helper-chat-input-row {
    align-items: flex-end;
    gap: 8px;
}

.llm-helper-chat-input {
    box-sizing: border-box;
    height: var(--llm-helper-chat-input-height, 38px);
    min-width: 0;
    min-height: 38px;
    max-height: 140px;
    line-height: 1.4;
    resize: none;
    overflow-y: auto;
    border-radius: 12px;
    padding: 9px 12px;
}

.llm-helper-chat-composer-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 7px;
}

.llm-helper-chat-target-chip {
    min-width: 0;
    max-width: 100%;
    padding: 3px 8px;
    border: 1px solid var(--background-modifier-border);
    border-radius: 999px;
    background-color: var(--background-secondary);
    color: var(--text-muted);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.llm-helper-chat-status-banner {
    margin: 0 0 7px;
    padding: 7px 9px;
    border: 1px solid var(--background-modifier-border);
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.35;
}

.llm-helper-chat-status-banner.is-hidden {
    display: none;
}

.llm-helper-chat-status-banner.is-warning {
    background-color: rgba(var(--color-yellow-rgb), 0.12);
    color: var(--text-warning);
}

.llm-helper-chat-status-banner.is-error {
    background-color: rgba(var(--color-red-rgb), 0.12);
    color: var(--text-error);
}

.llm-helper-chat-status-banner.is-info {
    background-color: var(--background-secondary);
    color: var(--text-muted);
}

.llm-helper-chat-disclaimer {
    margin-top: 6px;
    padding: 0 4px;
    color: var(--text-faint);
    font-size: 11px;
    line-height: 1.3;
    text-align: center;
}

.llm-helper-chat-submit {
    flex-shrink: 0;
    min-height: 38px;
}

.llm-helper-chat-submit.is-generating {
    background-color: var(--background-modifier-error);
    color: var(--text-on-accent);
}

.llm-helper-related-notes-content {
    padding: 0;
}

.llm-helper-related-notes-header,
.llm-helper-related-notes-title-wrap,
.llm-helper-related-notes-actions,
.llm-helper-related-note-title-row,
.llm-helper-related-note-row-actions {
    display: flex;
}

.llm-helper-related-notes-header {
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--background-modifier-border);
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--interactive-accent) 18%, transparent), transparent 58%),
        var(--background-primary);
}

.llm-helper-related-notes-title-wrap {
    gap: 12px;
    align-items: flex-start;
}

.llm-helper-related-notes-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--interactive-accent) 14%, var(--background-secondary));
    color: var(--interactive-accent);
}

.llm-helper-related-notes-title-text h2 {
    margin: 0;
    font-size: 18px;
}

.llm-helper-related-notes-status,
.llm-helper-related-notes-helper,
.llm-helper-related-note-path {
    color: var(--text-muted);
}

.llm-helper-related-notes-status {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.4;
}

.llm-helper-related-notes-refresh {
    margin-top: 2px;
}

.llm-helper-related-notes-actions {
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--background-modifier-border);
    background-color: var(--background-secondary);
}

.llm-helper-related-notes-helper {
    font-size: 12px;
}

.llm-helper-related-notes-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.llm-helper-related-notes-empty {
    padding: 18px;
    border: 1px dashed var(--background-modifier-border);
    border-radius: 14px;
    background: var(--background-secondary);
    color: var(--text-muted);
    text-align: center;
}

.llm-helper-related-note-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--background-modifier-border);
    border-radius: 16px;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--background-secondary) 88%, transparent), var(--background-primary));
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.llm-helper-related-note-checkbox {
    margin-top: 4px;
}

.llm-helper-related-note-body {
    min-width: 0;
}

.llm-helper-related-note-title-row {
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.llm-helper-related-note-open {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-normal);
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.llm-helper-related-note-open:hover {
    color: var(--interactive-accent);
}

.llm-helper-related-note-score {
    flex-shrink: 0;
    padding: 3px 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--interactive-accent) 14%, var(--background-modifier-hover));
    color: var(--interactive-accent);
    font-size: 11px;
    font-weight: 700;
}

.llm-helper-related-note-path {
    margin-top: 4px;
    font-size: 11px;
    word-break: break-word;
}

.llm-helper-related-note-preview {
    margin-top: 10px;
    line-height: 1.5;
}

.llm-helper-related-note-row-actions {
    margin-top: 12px;
    gap: 8px;
}

/* Vault Radar workspace view */
.llm-helper-radar-content {
    height: 100%;
    min-height: 0;
    padding: 0;
    overflow-y: auto;
}

.llm-helper-radar-header,
.llm-helper-radar-title-wrap,
.llm-helper-radar-toolbar,
.llm-helper-radar-card-heading,
.llm-helper-radar-sources,
.llm-helper-radar-feedback {
    display: flex;
}

.llm-helper-radar-header {
    position: sticky;
    top: 0;
    z-index: 2;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--background-modifier-border);
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--color-purple) 18%, transparent), transparent 62%),
        var(--background-primary);
}

.llm-helper-radar-title-wrap {
    min-width: 0;
    align-items: flex-start;
    gap: 12px;
}

.llm-helper-radar-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--color-purple) 16%, var(--background-secondary));
    color: var(--color-purple);
}

.llm-helper-radar-title h2 {
    margin: 0;
    font-size: 18px;
}

.llm-helper-radar-status,
.llm-helper-radar-helper,
.llm-helper-radar-card-meta {
    color: var(--text-muted);
}

.llm-helper-radar-status {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.4;
}

.llm-helper-radar-run {
    flex: 0 0 auto;
    min-height: 34px;
}

.llm-helper-radar-toolbar {
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 16px;
    border-bottom: 1px solid var(--background-modifier-border);
    background: var(--background-secondary);
}

.llm-helper-radar-helper {
    font-size: 12px;
    line-height: 1.4;
}

.llm-helper-radar-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.llm-helper-radar-empty,
.llm-helper-radar-error {
    padding: 18px;
    border: 1px dashed var(--background-modifier-border);
    border-radius: 14px;
    background: var(--background-secondary);
    color: var(--text-muted);
    line-height: 1.5;
    text-align: center;
}

.llm-helper-radar-error {
    border-style: solid;
    border-color: var(--background-modifier-error);
    color: var(--text-error);
}

.llm-helper-radar-card {
    padding: 14px;
    border: 1px solid var(--background-modifier-border);
    border-radius: 16px;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--background-secondary) 88%, transparent), var(--background-primary));
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.llm-helper-radar-card-heading {
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.llm-helper-radar-card h3 {
    margin: 8px 0 0;
    font-size: 15px;
    line-height: 1.35;
}

.llm-helper-radar-type {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-purple) 13%, var(--background-modifier-hover));
    color: var(--color-purple);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.llm-helper-radar-confidence {
    flex: 0 0 auto;
    padding-top: 3px;
    color: var(--text-faint);
    font-size: 10px;
    text-transform: capitalize;
}

.llm-helper-radar-card-body {
    margin-top: 9px;
    line-height: 1.5;
}

.llm-helper-radar-next-action {
    margin-top: 11px;
    padding: 10px 11px;
    border-left: 3px solid var(--interactive-accent);
    border-radius: 4px 9px 9px 4px;
    background: color-mix(in srgb, var(--interactive-accent) 8%, var(--background-secondary));
    line-height: 1.45;
}

.llm-helper-radar-next-action strong {
    display: block;
    margin-bottom: 3px;
    color: var(--text-muted);
    font-size: 10px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.llm-helper-radar-card-meta {
    margin-top: 12px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.llm-helper-radar-sources,
.llm-helper-radar-feedback {
    flex-wrap: wrap;
    gap: 7px;
}

.llm-helper-radar-sources {
    margin-top: 7px;
}

.llm-helper-radar-source,
.llm-helper-radar-feedback button {
    min-height: 32px;
}

.llm-helper-radar-source {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.llm-helper-radar-feedback {
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px solid var(--background-modifier-border);
}

.llm-helper-radar-feedback button[aria-pressed="true"] {
    border-color: var(--interactive-accent);
    background: color-mix(in srgb, var(--interactive-accent) 16%, var(--background-secondary));
    color: var(--interactive-accent);
}

.llm-helper-radar-run:focus-visible,
.llm-helper-radar-source:focus-visible,
.llm-helper-radar-feedback button:focus-visible {
    outline: 2px solid var(--interactive-accent);
    outline-offset: 2px;
}

.llm-helper-insight-canvas-summary {
    margin: 16px 0;
    padding: 14px 16px;
    border-left: 3px solid var(--color-purple);
    border-radius: 4px 12px 12px 4px;
    background: color-mix(in srgb, var(--color-purple) 8%, var(--background-secondary));
}

.llm-helper-insight-canvas-summary h3 {
    margin: 0 0 8px;
    font-size: 15px;
}

.llm-helper-insight-canvas-summary p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.5;
}

.llm-helper-insight-canvas-error:not(:empty) {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--background-modifier-error);
    color: var(--text-error);
}

.llm-helper-radar-content.is-running .llm-helper-radar-icon svg {
    animation: llm-helper-radar-pulse 1.4s ease-in-out infinite;
}

@keyframes llm-helper-radar-pulse {
    0%, 100% { opacity: 0.45; transform: scale(0.92); }
    50% { opacity: 1; transform: scale(1); }
}

@media (max-width: 500px) {
    .llm-helper-radar-header,
    .llm-helper-radar-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .llm-helper-radar-run {
        width: 100%;
    }
}
