﻿.boss-container {
    display: flex;
    flex-direction: column;
    height: 80vh;
    font-family: system-ui, sans-serif;
    background: #fafafa;
}

.boss-search {
    padding: 16px;
    border-bottom: 1px solid #e5e5e5;
    background: white;
    position: relative;
    display: flex;
    align-items: center;
}

    .boss-search input {
        width: 100%;
        padding: 12px 16px;
        font-size: 1.1rem;
        border: 1px solid #ddd;
        border-radius: 8px;
        outline: none;
        transition: 0.2s;
    }

        .boss-search input:focus {
            border-color: #8ab4f8;
            box-shadow: 0 0 0 2px rgba(138,180,248,0.3);
        }
.boss-filters {
    display: flex;
    gap: 8px;
    padding: 10px 16px;
    background: white;
    border-bottom: 1px solid #e5e5e5;
}

.filter-chip {
    padding: 5px 14px;
    font-size: 0.85rem;
    border: 1px solid #ddd;
    border-radius: 999px;
    background: #f3f3f3;
    color: #444;
    cursor: pointer;
    transition: 0.15s;
}

    .filter-chip:hover {
        background: #e9e9e9;
    }

    .filter-chip.active {
        background: #8ab4f8;
        border-color: #8ab4f8;
        color: white;
        font-weight: 600;
    }

#refreshBtn {
    margin-left: 8px;
    padding: 6px 10px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    background: #eee;
    border-radius: 6px;
    transition: 0.2s;
}

    #refreshBtn:hover {
        background: #ddd;
    }

.boss-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.boss-results {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
}
    .boss-results .icon {
        margin-right: 6px;
        font-size: 18px;
    }

.boss-preview {
    flex: 2;
    padding: 16px;
    border-left: 1px solid #e5e5e5;
    background: white;
    overflow-x: auto;
}
.group-header {
    padding: 8px;
    background: #eee;
    margin-top: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    border-radius: 4px;
}
.group-badge {
    background: #d1d5db;
    color: #111;    
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;    
}

.result-item {
    padding: 5px 6px;
    margin-bottom: 6px;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.15s;
}

    .result-item:hover {
        background: #f3f3f3;
    }

.result-type {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
}

.result-name {
    font-size: 0.85em;
    font-weight: bold;
    display: flex;
    justify-content: space-between; /* left + right */
    align-items: center;
}

.table-Rname {
    display: inline-block;
    text-align: right !important;
    color: gray;
    right: 5px;
    font-size: 0.85em;
}
.result-name2 {
    font-size: 1.25em;
    font-weight: bold;
    display: flex;
    justify-content: space-between; /* left + right */
    align-items: center;
}

.table-Rname2 {
    display: inline-block;
    text-align: right !important;
    color: gray;
    right: 5px;
    font-size: 1.25em;
}
/*.pill-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.pill {
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    transition: background 0.15s ease;
}

    .pill:hover {
        background: #f7f7f7;
    }

.pill-title {
    font-weight: 600;
    color: #222;
}

.pill-desc {
    font-size: 0.85em;
    color: #666;*/
}
/*- new pill */
.pill-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.pill {
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: background 0.15s ease;
}

    .pill:hover {
        background: #f7f7f7;
    }

.pill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pill-title {
    font-weight: 600;
    color: #222;
}

.pill-type {
    font-size: 12px;
    color: #666;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 6px;
}

.pill-sub {
    font-size: 13px;
    color: #555;
}

.pill-index {
    margin-top: 4px;
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: #444;
}

.pill-index-type {
    background: #dff0ff;
    color: #0066aa;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 600;
}

.pill-index-prio,
.pill-index-col {
    background: #eee;
    padding: 2px 6px;
    border-radius: 6px;
}
.pill-icons {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.pill-icon {
    font-size: 16px;
    line-height: 1;
}
/*- end pill*/
/*pre {
    direction: ltr;
    unicode-bidi: plaintext;
}
*/
.code-container {
    /* hosts a CodeMirror 6 read-only editor (real line numbers) instead of a hand-rolled <pre> */
    position: relative;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
}

.code-block {
    counter-reset: line;
    padding: 6px 0 6px 45px;
    margin: 0;
    white-space: pre;
    font-family: Consolas, monospace;
    font-size: 14px;
    line-height: 1.1; /* ⭐ tighter lines */
    direction: ltr;
    unicode-bidi: plaintext;
}

    .code-block code {
        display: block;
    }

        .code-block code span {
            display: flex;
            counter-increment: line;
            padding: 0; /* ⭐ remove extra padding */
            margin: 0; /* ⭐ remove extra margin */
        }

        .code-block code span::before {
                content: counter(line);
                position: absolute;
                left: 10px;
                color: #999;
                text-align: right;
                line-height: 1.1; /* ⭐ match line height */
                width: 30px;
            }
        .bottom-spacer {
            display: block;
            height: 20px; /* ⭐ your +10px fix */
        }
/*- RTL BLOCK */
/* \u202E -*/


.RTLcode-block {
    counter-reset: line;
    padding: 6px 45px 6px 0; /* swapped left/right padding */
    margin: 0;
    white-space: pre;
    font-family: Consolas, monospace;
    font-size: 14px;
    line-height: 1.1;
    direction: rtl; /* RTL direction */
    /*text-align: right !important;*/
    //unicode-bidi: plaintext;
}

    .RTLcode-block code {
        display: block;
        direction: rtl; /* RTL direction */
        /*text-align: right !important;*/
    }

        .RTLcode-block code span {
            display: flex;
            counter-increment: line;
            padding: 0;
            margin: 0;
            position: relative; /* needed for ::before on the right */
           /* text-align: right !important;*/
        }

            /*.RTLcode-block code span::before {
                content: counter(line);
                position: absolute;
                right: 10px;*/ /* moved from left → right */
                /*color: #999;
                text-align: left;*/ /* mirror alignment */
                /*line-height: 1.1;
                width: 30px;
            }*/

.bottom-spacer {
    display: block;
    height: 20px;
}

        /*- end rtl */
.highlight {
    background-color: yellow;
    color: black;
    font-weight: bold;
    padding: 0 2px;
}

/*-----------------------------*/

.analysis-summary {
    margin-top: 12px;
    padding: 10px;
    background: #222;
    color: #eee;
    border-radius: 6px;
    font-size: 14px;
    white-space: pre-wrap;
}

    .analysis-summary.hidden {
        display: none;
    }

/*-----------------------------*/
/* Claude AI insight (trigger/SQLI code view) */

.claude-insight-bar {
    margin-bottom: 10px;
}

.claude-insight-btn {
    padding: 7px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #7c5cff;
    border-radius: 999px;
    background: #7c5cff;
    color: white;
    cursor: pointer;
    transition: 0.15s;
}

    .claude-insight-btn:hover:not(:disabled) {
        background: #6a4ce0;
    }

    .claude-insight-btn:disabled {
        opacity: 0.6;
        cursor: default;
    }

.claude-insight-result:empty {
    margin: 0;
}

.claude-insight-loading {
    margin-top: 8px;
    font-size: 0.85rem;
    color: #666;
}

.claude-insight-text {
    margin-top: 8px;
    padding: 12px 14px;
    background: #f4f1ff;
    border: 1px solid #ded4ff;
    border-radius: 8px;
    color: #2a2a2a;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
    direction: ltr;
}

.claude-insight-error {
    margin-top: 8px;
    padding: 10px 14px;
    background: #fff0f0;
    border: 1px solid #ffd6d6;
    border-radius: 8px;
    color: #a33;
    font-size: 0.85rem;
}