#codex-diagnostics {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 380px;
    background: var(--card-bg, #1a1a2e);
    border: 1px solid var(--primary-color, #7b2ff7);
    border-radius: 10px;
    z-index: 10000;
    font-size: 0.85rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.codex-diag-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border-color, #333);
}

.codex-diag-header h4 {
    margin: 0;
    color: var(--primary-color, #7b2ff7);
    font-size: 0.9rem;
}

.codex-diag-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
}

.codex-diag-body {
    padding: 0.75rem 1rem;
}

.codex-diag-section {
    margin-bottom: 0.75rem;
}

.codex-diag-section h5 {
    margin: 0 0 0.4rem 0;
    color: var(--text-primary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#codex-diag-creds {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

#codex-diag-creds div {
    margin-bottom: 0.2rem;
}

#codex-diag-prompt {
    width: 100%;
    background: var(--bg-color, #0f0f1a);
    border: 1px solid var(--border-color, #333);
    color: var(--text-primary);
    border-radius: 4px;
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
    box-sizing: border-box;
}

#codex-diag-prompt:focus {
    outline: none;
    border-color: var(--primary-color, #7b2ff7);
}

#codex-diag-send {
    margin-bottom: 0.5rem;
}

#codex-diag-output {
    background: var(--bg-color, #0f0f1a);
    border: 1px solid var(--border-color, #333);
    border-radius: 4px;
    padding: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
}
