body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #ffffff; /* Light orangish background */
    position: fixed;
    width: 100%;
    height: 100%;
}

hr {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, #ddf6f6, #cce8e8, #dffcfc);
    margin: 0;
    padding: 0;
}

.message-container {
    display: flex;
}

#navbar {
    min-height: 65px;
    display: flex;
    color: #333;
    padding: 6px 12px;
    background: -webkit-linear-gradient(292deg, hsla(208, 67%, 81%, 1) 0%, hsla(37, 65%, 85%, 1) 50%, hsl(0deg 65% 83%) 100%);
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 4000;
    width: 100%;
    box-sizing: border-box;
}

.logo-container,
.title-container,
.button-container {
    text-align: center;
}

.logo-container {
    flex: 0 1 auto;
    min-width: 0;
}

.logo-container img {
    display: block;
    height: 40px;
    width: auto;
    max-width: min(380px, 42vw);
    object-fit: contain;
}

.title-container {
    position: static !important;
    left: auto !important;
    transform: none !important;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.button-container button {
    margin: 0 20px;
}


.navbar-title {
    background-clip: text;
    color: #4c4a3fbd;
    font-size: clamp(0.85rem, 2vw, 1.55rem);
    margin: 0;
    font-family: system-ui;
    font-weight: 200;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.button-container a {
    padding: 15px 15px 10px 15px;
    border-radius: 25px;
    background: #b592a375;
}

a {
    text-decoration: none;
    transition: background-color 0.2s;
    color: #333;
    border: solid 2px transparent;
}

a:hover {
    color: #333;
    background: #b592a3ae;
}

#chatbot {
    margin-left: 20%; /*Initial margin-left */
    padding: 10px;
    /*width: 80%;*/
    transition: margin-left 0.5s;
}

#chat-container {
    border-radius: 15px 15px 15px 15px; /* Rounded corners */
    background-color: rgba(255, 255, 255, 0.518); /* White background */
    padding: 5%;
    height: 77.5vh;
    overflow-y: scroll;

}

.user-name {
    font-size: 13px;
    text-align: right;
    margin-left: auto;
    margin-right: 10px;
}

.user-message {
    background-color: rgb(141 96 74 / 35%); /* Light bluish background */
    padding: 10px;
    margin-bottom: 10px; /* Decreased margin */
    border-radius: 15px;
    width: fit-content;
    max-width: 70%; /* Adjusted max-width */
    margin-left: auto; /* Align to the right */
    word-wrap: break-word;
    transition: box-shadow 0.2s;
    color: #5b4d4d;
    font-size: smaller;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.user-message:hover {
    background: rgba(141, 96, 74, 0.515);
}

.generator-name {
    font-size: 13px;
    margin-left: 10px;
}

.bot-message {
    overflow-x: auto;
    background-color: #90b2cc42; /* Light bluish color */
    color: #5b4d4d;
    text-align: left;
    padding: 10px;
    margin-bottom: 24px; /* Further increased margin */
    border-radius: 20px;
    width: fit-content;
    max-width: 100%;
    word-wrap: break-word;
    transition: box-shadow 0.2s;
    font-size: small;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.bot-message table {
    width: 100%;
    table-layout: auto;
}

.bot-message th, .bot-message td {
    text-align: left;
    padding: 8px;
    word-wrap: break-word;
}

.bot-message th {
    background-color: #f2f2f2;
}

.bot-message td {
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 170px;
}

.bot-message:hover {
    background: #90b2cc52;
}

.bot-message:hover .info-icon {
    display: flex;
}

/* Add to your existing CSS file */

.table th {
    position: relative;
    cursor: pointer;
}

.sort-icon {
    display: inline-block;
    margin-left: 5px;
    font-size: 0.8em;
}

.table th[data-sort='asc'] .sort-icon::after {
    content: '▲'; /* Ascending sort icon */
}

.table th[data-sort='desc'] .sort-icon::after {
    content: '▼'; /* Descending sort icon */
}

.table th[data-sort='none'] .sort-icon::after {
    content: '⇅'; /* Default sort icon */
}


.like-icon {
    margin-bottom: 9px;
}

.avatar-icon {
    margin-right: 10px;
    margin-top: 25px;
}


.info-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    outline: none;
    cursor: pointer;
    position: relative;
    bottom: 5px;
    right: 10px;
    float: right;
    padding: 0;
    margin-left: 10px;
    transition: opacity 0.3s;
}

.export-icon {
    cursor: pointer;
    margin-top: 5px;
}

.info-button {
    border: none;
    background: transparent;
    padding: 0;
    margin: 10px;
    width: min-content;
    height: min-content;
    border-radius: 50%;
    margin-top: 10px;
}

.response-toolbar {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
    margin-top: 6px;
    clear: both;
    float: none;
    box-sizing: border-box;
}

.response-feedback-box,
.response-action-box {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 0;
    border: none;
    outline: none;
    box-shadow: none;
    background: transparent;
}

.response-feedback-box {
    justify-content: flex-start;
    margin: 0;
}

.response-action-box {
    justify-content: flex-end;
    margin: 0 0 0 auto;
}

.desc-button {
    border: none;
    background: transparent;
    padding: 0;
    width: min-content;
    height: min-content;
    cursor: pointer;
}

.desc-icon {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.response-description-panel {
    margin-top: 10px;
    padding: 12px 14px;
    background: #f4f7fb;
    border-left: 4px solid #2b6cb0;
    border-radius: 6px;
    white-space: pre-wrap;
    font-size: 0.92rem;
    line-height: 1.45;
    color: #1a365d;
}

.response-summary-answer {
    white-space: pre-wrap;
}

.response-token-cost {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #c5d4e8;
    color: #2c5282;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: normal;
}

.merged-result-table {
    overflow-x: auto;
    width: 100%;
    margin-bottom: 10px;
}

.merged-result-table table {
    width: 100%;
    min-width: 720px;
}


#input-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    margin-top: 15px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 0 0 15px 15px;
    box-sizing: border-box;
}

#input-container input[type=text],
#input-container .message-input {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    padding: 12px 18px;
    box-sizing: border-box;
    border: 0.5px solid #cccccc;
    border-radius: 25px;
    display: block;
    margin-bottom: 0;
    height: 46px;
    background-color: #ffffff;
    color: #515050;
    outline: none;
    font-size: 14px;
}

button.follow-up-toggle {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 46px;
    width: auto;
    min-width: 46px;
    margin: 0;
    padding: 0 12px 0 10px;
    border: 1px solid #d7dbe3;
    border-radius: 23px;
    background: #f4f6f9;
    color: #5b6575;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1;
    box-shadow: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

button.follow-up-toggle:hover,
button.follow-up-toggle:focus-visible {
    outline: none;
    border-color: #9aa7bc;
    box-shadow: 0 0 0 3px rgba(22, 35, 58, 0.08);
}

.follow-up-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9aa3b2;
    flex: 0 0 auto;
}

.follow-up-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.follow-up-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
}

.follow-up-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.follow-up-state {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.85;
}

.follow-up-toggle.is-on {
    background: #16233a;
    border-color: #16233a;
    color: #ffffff;
}

.follow-up-toggle.is-on .follow-up-dot {
    background: #5ee0b5;
    box-shadow: 0 0 0 3px rgba(94, 224, 181, 0.22);
}

.follow-up-toggle.is-off {
    background: #eef1f5;
    border-color: #d5dae3;
    color: #667085;
}

.follow-up-toggle.is-off .follow-up-dot {
    background: #c5ccd6;
}

#input-container #micBtn,
#input-container #submitButton {
    flex: 0 0 auto;
    height: 46px;
    width: 46px;
    min-width: 46px;
    margin: 0;
}

#input-container .input-group-append {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

#chat-container input[type=text],
#input-container input[type=text],
.message-input {
    width: calc(100% - 70px);
    padding: 12px 20px;
    box-sizing: border-box;
    border: 0.5px solid #cccccc;
    border-radius: 25px;
    transition: width 0.5s;
    display: inline-block;
    margin-bottom: 0;
    height: 50px;
    background-color: #ffffff;
    color: #515050;
    outline: none;
    font-size: smaller;
}

.textInput:focus {
    outline: none;
    box-shadow: none;
    background-color: #e2e1e0;
}

#submit-arrow img {
    margin-top: -2px;
}

button {
    margin-left: 10px;
    height: 50px;
    width: 70px;
    padding: 0;
    box-sizing: border-box;
    border: none;
    border-radius: 20px;
    background: #16233a;
    color: #ffffff;
    cursor: pointer;
    font-size: 20px;
    transition: background-color 0.3s;
}

.d-grid .like-button, .d-grid .dislike-button {
    width: 20px;
}

.bot-message .response-toolbar button,
.bot-message .response-toolbar .like-button,
.bot-message .response-toolbar .dislike-button,
.bot-message .response-toolbar .tag-button,
.bot-message .response-toolbar .info-button,
.bot-message .response-toolbar .desc-button,
.bot-message .response-toolbar .response-mode-button,
.bot-message .response-toolbar .export-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    max-width: 20px;
    max-height: 20px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    line-height: 0;
    color: inherit;
    box-sizing: border-box;
    float: none;
    position: static;
}

.bot-message .response-toolbar img,
.bot-message .response-toolbar .like-icon,
.bot-message .response-toolbar .info-icon,
.bot-message .response-toolbar .export-icon,
.bot-message .response-toolbar .desc-icon {
    display: block;
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    max-width: 20px;
    max-height: 20px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    float: none;
    position: static;
    bottom: auto;
    right: auto;
    object-fit: contain;
    vertical-align: middle;
    box-sizing: border-box;
}


#plusMinusBtn{
    margin: 0;
    background: none;
    transition: border 0.3s;
    color: black;
}

#micBtn {
    margin: 0;
    background: none;
    transition: border 0.3s;
}

#submitButton {
    margin: 0;
    background: none;
    transition: border 0.3s;
}

#submitButton:disabled {
    cursor: not-allowed;
    border: none;
}

#sidebar {
    width: 250px;
    height: calc(100% - 65px);
    position: fixed;
    left: 0;
    top: 65px;
    background: -webkit-linear-gradient(0deg, hsl(294.6deg 8.83% 54.37% / 33%) 0%, hsl(0deg 0% 100%) 100%);
    padding-top: 0;
    overflow-y: auto;
    transition: transform 0.28s ease, width 0.28s ease;
    z-index: 1050;
}

.sidebar-backdrop {
    display: none;
}

#sidebar a {
    padding: 8px;
    text-decoration: none;
    font-size: 16px;
    color: #333; /* Dark gray text for sidebar links */
    display: block;
    transition: background-color 0.3s;
}

#sidebar a:hover {
    color: #ffffff; /* White text on hover */
    background-color: #92acb0; /* Light bluish background on hover */
}

.sidebar-head {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 10px 8px;
}

.sidebar-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

#menuBtn {
    font-size: 16px;
    cursor: pointer;
    position: static;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #333;
    min-height: 32px;
}

#menuBtn span {
    font-size: 13px;
    margin-left: 0;
    font-weight: 600;
    letter-spacing: 0.02em;
}

#sidebar.collapsed .osm-ops-dash-label,
#sidebar.collapsed #menuBtn span,
#sidebar.collapsed #userMessageList {
    display: none;
}

#sidebar.collapsed .osm-ops-dash-btn {
    justify-content: center;
    padding: 6px;
    width: 40px;
}

/* Added CSS for collapsed state */
#sidebar.collapsed {
    width: 60px;
}

#sidebar.collapsed a {
    padding: 8px;
    text-align: center;
    overflow: hidden;

}

/* Added CSS to hide sidebar content in collapsed state */
#sidebar.collapsed a:not(:first-child) {
    display: none;
}

/* Additional styling for responsiveness and aesthetics */
@media screen and (max-width: 820px) {
    .follow-up-label {
        display: none;
    }

    button.follow-up-toggle {
        padding: 0 12px;
    }
}

@media screen and (max-width: 600px) {
    #input-container {
        gap: 6px;
        padding: 8px;
    }

    #input-container input[type=text],
    #input-container .message-input {
        width: auto;
        height: 42px;
        padding: 10px 14px;
        border-radius: 21px;
        font-size: 14px;
    }

    button.follow-up-toggle {
        height: 42px;
        width: 42px;
        min-width: 42px;
        padding: 0;
        border-radius: 21px;
    }

    .follow-up-copy {
        display: none;
    }

    #input-container #micBtn,
    #input-container #submitButton {
        width: 42px;
        height: 42px;
        min-width: 42px;
    }
}

.user-message-list {
    list-style-type: none;
    padding: 0;
}

.user-message-list li {
    padding: 8px;
    text-decoration: none;
    color: #5b4d4d; /* Dark gray text for user messages in light theme */
    display: block;
    transition: background-color 0.3s;
    cursor: pointer;
    border-bottom: 1px solid #ccc;
    font-size: smaller;
}

.user-message-list li:hover {
    color: #5b4d4d; /* White text on hover */
    background-color: #dfdee0; /* Light bluish background on hover */
}

.user-message-list li:last-child {
    border-bottom: none;
}

.spinner-border-sm {
    --bs-spinner-width: 2rem;
    --bs-spinner-height: 2rem;
    --bs-spinner-border-width: 0.2em;
    color: #9c447fa8;
}

.user-message-list.collapsed {
    display: none;
}

#bottomButton {
    z-index: 1;
    position: fixed;
    bottom: 16%;
    width: auto;
    height: auto;
    padding: 2px 15px;
    outline: none;
    opacity: 0.5;
    transition: opacity 0.3s;
    font-family: Arial, sans-serif;
    font-size: 16px;
    left: 50%;
    display: none;
}

#bottomButton:hover {
    opacity: 1;
}

#sqlQuery {
    font-size: 13px;
    white-space: pre-wrap;
    display: block;
}

.sql-step-heading {
    margin: 16px 0 8px;
    font-size: 15px;
    font-weight: 600;
    color: #3b3030;
}

.sql-step-heading:first-child {
    margin-top: 0;
}

.sql-step-pre {
    background: #f5f2f0;
    min-width: 100%;
    white-space: pre-wrap;
    padding: 10px;
    margin-bottom: 8px;
}

.sql-modal-header {
    background: #f7f4f0 !important;
    height: auto !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sql-token-panel {
    display: block;
    margin: 0 0 16px;
    padding: 12px 14px;
    background: #f7f4f0;
    border: 1px solid #ddd5d0;
    border-radius: 8px;
}

.sql-token-summary {
    margin: 0 0 8px;
    font-size: 0.92rem;
    color: #3b3030;
}

.sql-token-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.sql-token-table th,
.sql-token-table td {
    padding: 6px 8px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.sql-token-table th {
    color: #5a4a42;
    font-weight: 600;
}

.sql-token-table td:nth-child(n+2),
.sql-token-table th:nth-child(n+2) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.sql-token-table tfoot th {
    border-top: 1px solid #d8cdc6;
    font-weight: 600;
}

.info-table {
    width: 70%;
}

.info-cell {
    font-size: smaller;
    color: #3b3030;
    text-align: center;
    padding: 1px;
    background-color: #c8a598d1;
    border-radius: 10px 0 0 10px;
}

.value-cell {
    text-align: center;
    padding: 1px;
    background-color: rgb(209 209 209);
    border-radius: 0 10px 10px 0;
    font-size: smaller;
}

.title-cell {
    padding: 1px;
    background-color: rgb(84 38 66 / 82%);
    text-align: center;
    border-radius: 10px 0 10px 0;
    color: #fae4e4;
    font-size: smaller;
}

.if-chat-dashboard {
    margin: 8px 0 12px;
}
.if-chat-kpis {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}
.if-chat-kpi {
    min-width: 120px;
    padding: 8px 12px;
    border-radius: 10px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}
.if-chat-kpi .lbl {
    display: block;
    font-size: 11px;
    color: #64748b;
}
.if-chat-kpi .val {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}
.if-chat-dash-sub {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
}

.osm-ops-dash-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: 0;
    background: linear-gradient(135deg, #1f4652 0%, #3d7382 52%, #9d7d8c 100%);
    border-radius: 14px;
    padding: 8px 10px;
    cursor: pointer;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(31, 70, 82, 0.28);
}

.osm-ops-header {
    background: linear-gradient(292deg, hsla(208, 67%, 81%, 1) 0%, hsla(37, 65%, 85%, 1) 50%, hsl(0deg 65% 83%) 100%);
}

.osm-ops-header .modal-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
}

.osm-ops-header .modal-title img {
    width: 22px;
    height: 22px;
}

.osm-ops-status {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 10px;
}

.osm-ops-kpis {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.osm-ops-kpi {
    background: #f7f4f0;
    border-radius: 10px;
    padding: 10px;
}

.osm-ops-kpi.is-alert {
    background: #f8e7e4;
}

.osm-ops-kpi-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #3b2f3a;
}

.osm-ops-kpi span:last-child,
.osm-ops-mini span {
    display: block;
    font-size: 11px;
    color: #6b5e68;
}

.osm-ops-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 10px;
}

.osm-ops-card {
    background: #fff;
    border: 1px solid #e8e4df;
    border-radius: 12px;
    padding: 10px;
}

.osm-ops-card h6 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.osm-ops-chart {
    width: 100%;
    min-height: 260px;
}

.osm-ops-mini {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.osm-ops-mini strong {
    display: block;
    font-size: 16px;
}

.osm-ops-note {
    font-size: 11px;
    color: #64748b;
    margin: 0 0 8px;
}

@media screen and (max-width: 992px) {
    .osm-ops-kpis,
    .osm-ops-grid,
    .osm-ops-mini {
        grid-template-columns: 1fr 1fr;
    }
}

@media screen and (max-width: 768px) {
    .osm-ops-kpis,
    .osm-ops-grid,
    .osm-ops-mini {
        grid-template-columns: 1fr;
    }
}

.chatbot_main_container {
    margin-left: 250px;
    min-width: 0;
}

.merged-result-table {
    overflow-x: auto;
}

@media screen and (max-width: 992px) {
    body {
        overflow-x: hidden;
    }

    #navbar {
        min-height: 56px;
        padding: 6px 10px;
    }

    .navbar-title {
        font-size: 0.95rem;
    }

    .logo-container img {
        height: 32px;
        max-width: min(220px, 46vw);
    }

    #sidebar,
    #sidebar.collapsed {
        width: min(86vw, 320px);
        top: 56px;
        height: calc(100% - 56px);
        transform: translateX(-105%);
        box-shadow: none;
        pointer-events: none;
        visibility: hidden;
        overflow-y: auto;
    }

    #sidebar.is-open {
        transform: translateX(0);
        box-shadow: 8px 0 28px rgba(20, 32, 40, 0.22);
        pointer-events: auto;
        visibility: visible;
    }

    .sidebar-backdrop {
        display: none;
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(24, 36, 42, 0.35);
        z-index: 1040;
    }

    body.sidebar-open .sidebar-backdrop {
        display: block;
    }

    .chatbot_main_container,
    #chatbot-main-container {
        margin-left: 0 !important;
        width: 100%;
    }

    #chat-container {
        height: calc(100dvh - 170px);
        padding: 12px;
        border-radius: 12px;
    }

    .user-message,
    .bot-message {
        max-width: 100%;
    }

    .response-toolbar {
        flex-wrap: wrap;
    }

    .message-form,
    #input-container {
        width: 100%;
    }
}

@media screen and (max-width: 720px) {
    .title-container {
        display: none;
    }

    .logo-container img {
        max-width: min(200px, 54vw);
    }
}