@-webkit-keyframes notyf-fadeinup{0%{opacity:0;transform:translateY(25%)}to{opacity:1;transform:translateY(0)}}@keyframes notyf-fadeinup{0%{opacity:0;transform:translateY(25%)}to{opacity:1;transform:translateY(0)}}@-webkit-keyframes notyf-fadeinleft{0%{opacity:0;transform:translateX(25%)}to{opacity:1;transform:translateX(0)}}@keyframes notyf-fadeinleft{0%{opacity:0;transform:translateX(25%)}to{opacity:1;transform:translateX(0)}}@-webkit-keyframes notyf-fadeoutright{0%{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(25%)}}@keyframes notyf-fadeoutright{0%{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(25%)}}@-webkit-keyframes notyf-fadeoutdown{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(25%)}}@keyframes notyf-fadeoutdown{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(25%)}}@-webkit-keyframes ripple{0%{transform:scale(0) translateY(-45%) translateX(13%)}to{transform:scale(1) translateY(-45%) translateX(13%)}}@keyframes ripple{0%{transform:scale(0) translateY(-45%) translateX(13%)}to{transform:scale(1) translateY(-45%) translateX(13%)}}.notyf{position:fixed;top:0;left:0;height:100%;width:100%;color:#fff;z-index:9999;display:flex;flex-direction:column;align-items:flex-end;justify-content:flex-end;pointer-events:none;box-sizing:border-box;padding:20px}.notyf__icon--error,.notyf__icon--success{height:21px;width:21px;background:#fff;border-radius:50%;display:block;margin:0 auto;position:relative}.notyf__icon--error:after,.notyf__icon--error:before{content:"";background:currentColor;display:block;position:absolute;width:3px;border-radius:3px;left:9px;height:12px;top:5px}.notyf__icon--error:after{transform:rotate(-45deg)}.notyf__icon--error:before{transform:rotate(45deg)}.notyf__icon--success:after,.notyf__icon--success:before{content:"";background:currentColor;display:block;position:absolute;width:3px;border-radius:3px}.notyf__icon--success:after{height:6px;transform:rotate(-45deg);top:9px;left:6px}.notyf__icon--success:before{height:11px;transform:rotate(45deg);top:5px;left:10px}.notyf__toast{display:block;overflow:hidden;pointer-events:auto;-webkit-animation:notyf-fadeinup .3s ease-in forwards;animation:notyf-fadeinup .3s ease-in forwards;box-shadow:0 3px 7px 0 rgba(0,0,0,.25);position:relative;padding:0 15px;border-radius:2px;max-width:300px;transform:translateY(25%);box-sizing:border-box;flex-shrink:0}.notyf__toast--disappear{transform:translateY(0);-webkit-animation:notyf-fadeoutdown .3s forwards;animation:notyf-fadeoutdown .3s forwards;-webkit-animation-delay:.25s;animation-delay:.25s}.notyf__toast--disappear .notyf__icon,.notyf__toast--disappear .notyf__message{-webkit-animation:notyf-fadeoutdown .3s forwards;animation:notyf-fadeoutdown .3s forwards;opacity:1;transform:translateY(0)}.notyf__toast--disappear .notyf__dismiss{-webkit-animation:notyf-fadeoutright .3s forwards;animation:notyf-fadeoutright .3s forwards;opacity:1;transform:translateX(0)}.notyf__toast--disappear .notyf__message{-webkit-animation-delay:.05s;animation-delay:.05s}.notyf__toast--upper{margin-bottom:20px}.notyf__toast--lower{margin-top:20px}.notyf__toast--dismissible .notyf__wrapper{padding-right:30px}.notyf__ripple{height:400px;width:400px;position:absolute;transform-origin:bottom right;right:0;top:0;border-radius:50%;transform:scale(0) translateY(-51%) translateX(13%);z-index:5;-webkit-animation:ripple .4s ease-out forwards;animation:ripple .4s ease-out forwards}.notyf__wrapper{display:flex;align-items:center;padding-top:17px;padding-bottom:17px;padding-right:15px;border-radius:3px;position:relative;z-index:10}.notyf__icon{width:22px;text-align:center;font-size:1.3em;opacity:0;-webkit-animation:notyf-fadeinup .3s forwards;animation:notyf-fadeinup .3s forwards;-webkit-animation-delay:.3s;animation-delay:.3s;margin-right:13px}.notyf__dismiss{position:absolute;top:0;right:0;height:100%;width:26px;margin-right:-15px;-webkit-animation:notyf-fadeinleft .3s forwards;animation:notyf-fadeinleft .3s forwards;-webkit-animation-delay:.35s;animation-delay:.35s;opacity:0}.notyf__dismiss-btn{background-color:rgba(0,0,0,.25);border:none;cursor:pointer;transition:opacity .2s ease,background-color .2s ease;outline:none;opacity:.35;height:100%;width:100%}.notyf__dismiss-btn:after,.notyf__dismiss-btn:before{content:"";background:#fff;height:12px;width:2px;border-radius:3px;position:absolute;left:calc(50% - 1px);top:calc(50% - 5px)}.notyf__dismiss-btn:after{transform:rotate(-45deg)}.notyf__dismiss-btn:before{transform:rotate(45deg)}.notyf__dismiss-btn:hover{opacity:.7;background-color:rgba(0,0,0,.15)}.notyf__dismiss-btn:active{opacity:.8}.notyf__message{vertical-align:middle;position:relative;opacity:0;-webkit-animation:notyf-fadeinup .3s forwards;animation:notyf-fadeinup .3s forwards;-webkit-animation-delay:.25s;animation-delay:.25s;line-height:1.5em}@media only screen and (max-width:480px){.notyf{padding:0}.notyf__ripple{height:600px;width:600px;-webkit-animation-duration:.5s;animation-duration:.5s}.notyf__toast{max-width:none;border-radius:0;box-shadow:0 -2px 7px 0 rgba(0,0,0,.13);width:100%}.notyf__dismiss{width:56px}}
.notyf-announcer{
    z-index: 100000000000;
}

.notyf{
    z-index: 100000000000;
}
/*!
 * Ladda
 * http://lab.hakim.se/ladda
 * MIT licensed
 *
 * Copyright (C) 2018 Hakim El Hattab, http://hakim.se
 */@keyframes ladda-spinner-line-fade{0%,100%{opacity:0.22}1%{opacity:1}}.ladda-button{position:relative}.ladda-button .ladda-spinner{position:absolute;z-index:2;display:inline-block;width:32px;top:50%;margin-top:0;opacity:0;pointer-events:none}.ladda-button .ladda-label{position:relative;z-index:3}.ladda-button .ladda-progress{position:absolute;width:0;height:100%;left:0;top:0;background:rgba(0,0,0,0.2);display:none;transition:0.1s linear all !important}.ladda-button[data-loading] .ladda-progress{display:block}.ladda-button,.ladda-button .ladda-spinner,.ladda-button .ladda-label{transition:0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) all !important}.ladda-button[data-style=zoom-in],.ladda-button[data-style=zoom-in] .ladda-spinner,.ladda-button[data-style=zoom-in] .ladda-label,.ladda-button[data-style=zoom-out],.ladda-button[data-style=zoom-out] .ladda-spinner,.ladda-button[data-style=zoom-out] .ladda-label{transition:0.3s ease all !important}.ladda-button[data-style=expand-right] .ladda-spinner{right:-6px}.ladda-button[data-style=expand-right][data-size="s"] .ladda-spinner,.ladda-button[data-style=expand-right][data-size="xs"] .ladda-spinner{right:-12px}.ladda-button[data-style=expand-right][data-loading]{padding-right:56px}.ladda-button[data-style=expand-right][data-loading] .ladda-spinner{opacity:1}.ladda-button[data-style=expand-right][data-loading][data-size="s"],.ladda-button[data-style=expand-right][data-loading][data-size="xs"]{padding-right:40px}.ladda-button[data-style=expand-left] .ladda-spinner{left:26px}.ladda-button[data-style=expand-left][data-size="s"] .ladda-spinner,.ladda-button[data-style=expand-left][data-size="xs"] .ladda-spinner{left:4px}.ladda-button[data-style=expand-left][data-loading]{padding-left:56px}.ladda-button[data-style=expand-left][data-loading] .ladda-spinner{opacity:1}.ladda-button[data-style=expand-left][data-loading][data-size="s"],.ladda-button[data-style=expand-left][data-loading][data-size="xs"]{padding-left:40px}.ladda-button[data-style=expand-up]{overflow:hidden}.ladda-button[data-style=expand-up] .ladda-spinner{top:-32px;left:50%;margin-left:0}.ladda-button[data-style=expand-up][data-loading]{padding-top:54px}.ladda-button[data-style=expand-up][data-loading] .ladda-spinner{opacity:1;top:26px;margin-top:0}.ladda-button[data-style=expand-up][data-loading][data-size="s"],.ladda-button[data-style=expand-up][data-loading][data-size="xs"]{padding-top:32px}.ladda-button[data-style=expand-up][data-loading][data-size="s"] .ladda-spinner,.ladda-button[data-style=expand-up][data-loading][data-size="xs"] .ladda-spinner{top:4px}.ladda-button[data-style=expand-down]{overflow:hidden}.ladda-button[data-style=expand-down] .ladda-spinner{top:62px;left:50%;margin-left:0}.ladda-button[data-style=expand-down][data-size="s"] .ladda-spinner,.ladda-button[data-style=expand-down][data-size="xs"] .ladda-spinner{top:40px}.ladda-button[data-style=expand-down][data-loading]{padding-bottom:54px}.ladda-button[data-style=expand-down][data-loading] .ladda-spinner{opacity:1}.ladda-button[data-style=expand-down][data-loading][data-size="s"],.ladda-button[data-style=expand-down][data-loading][data-size="xs"]{padding-bottom:32px}.ladda-button[data-style=slide-left]{overflow:hidden}.ladda-button[data-style=slide-left] .ladda-label{position:relative}.ladda-button[data-style=slide-left] .ladda-spinner{left:100%;margin-left:0}.ladda-button[data-style=slide-left][data-loading] .ladda-label{opacity:0;left:-100%}.ladda-button[data-style=slide-left][data-loading] .ladda-spinner{opacity:1;left:50%}.ladda-button[data-style=slide-right]{overflow:hidden}.ladda-button[data-style=slide-right] .ladda-label{position:relative}.ladda-button[data-style=slide-right] .ladda-spinner{right:100%;margin-left:0;left:16px}[dir="rtl"] .ladda-button[data-style=slide-right] .ladda-spinner{right:auto}.ladda-button[data-style=slide-right][data-loading] .ladda-label{opacity:0;left:100%}.ladda-button[data-style=slide-right][data-loading] .ladda-spinner{opacity:1;left:50%}.ladda-button[data-style=slide-up]{overflow:hidden}.ladda-button[data-style=slide-up] .ladda-label{position:relative}.ladda-button[data-style=slide-up] .ladda-spinner{left:50%;margin-left:0;margin-top:1em}.ladda-button[data-style=slide-up][data-loading] .ladda-label{opacity:0;top:-1em}.ladda-button[data-style=slide-up][data-loading] .ladda-spinner{opacity:1;margin-top:0}.ladda-button[data-style=slide-down]{overflow:hidden}.ladda-button[data-style=slide-down] .ladda-label{position:relative}.ladda-button[data-style=slide-down] .ladda-spinner{left:50%;margin-left:0;margin-top:-2em}.ladda-button[data-style=slide-down][data-loading] .ladda-label{opacity:0;top:1em}.ladda-button[data-style=slide-down][data-loading] .ladda-spinner{opacity:1;margin-top:0}.ladda-button[data-style=zoom-out]{overflow:hidden}.ladda-button[data-style=zoom-out] .ladda-spinner{left:50%;margin-left:32px;transform:scale(2.5)}.ladda-button[data-style=zoom-out] .ladda-label{position:relative;display:inline-block}.ladda-button[data-style=zoom-out][data-loading] .ladda-label{opacity:0;transform:scale(0.5)}.ladda-button[data-style=zoom-out][data-loading] .ladda-spinner{opacity:1;margin-left:0;transform:none}.ladda-button[data-style=zoom-in]{overflow:hidden}.ladda-button[data-style=zoom-in] .ladda-spinner{left:50%;margin-left:-16px;transform:scale(0.2)}.ladda-button[data-style=zoom-in] .ladda-label{position:relative;display:inline-block}.ladda-button[data-style=zoom-in][data-loading] .ladda-label{opacity:0;transform:scale(2.2)}.ladda-button[data-style=zoom-in][data-loading] .ladda-spinner{opacity:1;margin-left:0;transform:none}.ladda-button[data-style=contract]{overflow:hidden;width:100px}.ladda-button[data-style=contract] .ladda-spinner{left:50%;margin-left:0}.ladda-button[data-style=contract][data-loading]{border-radius:50%;width:52px}.ladda-button[data-style=contract][data-loading] .ladda-label{opacity:0}.ladda-button[data-style=contract][data-loading] .ladda-spinner{opacity:1}.ladda-button[data-style=contract-overlay]{overflow:hidden;width:100px;box-shadow:0px 0px 0px 2000px rgba(0,0,0,0)}.ladda-button[data-style=contract-overlay] .ladda-spinner{left:50%;margin-left:0}.ladda-button[data-style=contract-overlay][data-loading]{border-radius:50%;width:52px;box-shadow:0px 0px 0px 2000px rgba(0,0,0,0.8)}.ladda-button[data-style=contract-overlay][data-loading] .ladda-label{opacity:0}.ladda-button[data-style=contract-overlay][data-loading] .ladda-spinner{opacity:1}[dir="rtl"] .ladda-spinner>div{left:25% !important}

.rnBackDrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 100000;
  background-color: rgba(0, 0, 0, 0.5); }
  .rnBackDrop.rnFade {
    opacity: 0; }
  .rnBackDrop.rnShow {
    opacity: .5; }

.rnModal {
  width: 500px;
  position: fixed;
  top: 0;
  left: 50%;
  background-color: white;
  z-index: 100001;
  border-radius: 5px; }

.rnModal .rnCloseIcon {
  cursor: pointer; }

.rnModal .rnCloseIcon:hover {
  color: red; }

.rnHeader {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  flex-direction: row;
  align-items: center; }

.rnFooter {
  padding: 16px;
  text-align: right; }

.rnFooter button {
  margin-left: 5px; }

.rnContent {
  padding: 16px;
  border-bottom: 1px solid #e9ecef;
  border-top: 1px solid #e9ecef; }

.CodeMirror-hints {
  position: absolute;
  z-index: 10;
  overflow: hidden;
  list-style: none;

  margin: 0;
  padding: 2px;

  -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
  -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
  box-shadow: 2px 3px 5px rgba(0,0,0,.2);
  border-radius: 3px;
  border: 1px solid silver;

  background: white;
  font-size: 90%;
  font-family: monospace;

  max-height: 20em;
  overflow-y: auto;
}

.CodeMirror-hint {
  margin: 0;
  padding: 0 4px;
  border-radius: 2px;
  white-space: pre;
  color: black;
  cursor: pointer;
}

li.CodeMirror-hint-active {
  background: #08f;
  color: white;
}

.CodeMirror-placeholder{
    color:#6f6f6f !important;
}

.FormulaBuilder .CodeMirror
{
    border:none;
}

.formulaField{
    font-weight: bold;
    border: 1px solid black;
    background-color: #dfdfdf;
    padding: 1px;
    margin:0 2px;
}

.formulaFieldPicker li{
    padding:10px;
    border-left:1px solid #dfdfdf;
    border-bottom:1px solid #dfdfdf;
    border-right:1px solid #dfdfdf;
    margin:0;
    cursor:pointer;
}

.formulaFieldPicker li:hover{
    background-color: #f9f9f9;
}

.formulaFieldPicker li:first-child{
    border-top:1px solid #dfdfdf;
}

.sfFormulaLabel{
    font-weight: bold;
}
.sfFormulaDescription{
    font-style: italic;
    color:#888;
    display: block;
}

li.CodeMirror-hint-active .sfFormulaDescription{
    color:black;
}


li.CodeMirror-hint-active{
    color:black !important;
    background-color:#CCCCFF !important;
}


.rnAccordionItem{
    padding: 10px 0;
    background-color: #f7f7f9;
    border-style: solid;
    border-width: 1px;
    border-color: #e5e5e5;
    padding-left: 3px;
    cursor: pointer;

}

.rnAccordionItem a{
    text-decoration: none;
    box-shadow: none;
    color:#337ab7;
}

.rnAccordionItem a:focus{
    color:#337ab7;
    text-decoration: none;
}

.rnAccordionItem:hover a{
    text-decoration: underline;
}
.rnAccordionFunction .rnAccordionContent{
    padding: 0 !important;
}

.FunctionPickerItem:hover{
    background-color: #f9f9f9;
}
/* ============================================
   AI Chat Panel - Reusable Chat Control Styles
   ============================================ */

/* ============================================
   Chat Panel (Container)
   ============================================ */
.aiChatPanel {
    width: 30%;
    min-width: 280px;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e0e0e0;
    background: #fafafa;
    position: relative;
}

.aiChatPanel .chatHeader {
    padding: 12px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    min-height: 20px;
}

.aiChatPanel .chatHeader svg {
    width: 16px;
    height: 16px;
}

.aiChatPanel .chatMessages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.aiChatPanel .chatMessages::-webkit-scrollbar {
    width: 5px;
}

.aiChatPanel .chatMessages::-webkit-scrollbar-track {
    background: transparent;
}

.aiChatPanel .chatMessages::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-radius: 10px;
}

/* ============================================
   Chat Messages
   ============================================ */
.aiChatMessage {
    display: flex;
    flex-direction: column;
    animation: messageSlideIn 0.3s ease-out;
}

.aiChatMessage.user {
    align-items: flex-end;
}

.aiChatMessage.assistant {
    align-items: flex-start;
}

.aiChatMessage .messageBubble {
    max-width: 90%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.5;
    word-wrap: break-word;
    position: relative;
}

.aiChatMessage.user .messageBubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.aiChatMessage.assistant .messageBubble {
    background: white;
    color: #333;
    border: 1px solid #e8e8e8;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.aiChatMessage .messageRole {
    font-size: 11px;
    color: #999;
    margin-bottom: 4px;
    padding: 0 4px;
    font-weight: 500;
}

.aiChatMessage .messageActions {
    margin-top: 8px;
    display: flex;
    gap: 6px;
}

.aiChatMessage .messageActions button {
    padding: 5px 12px;
    border-radius: 14px;
    border: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.aiChatMessage .messageActions .btnUseTemplate {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.aiChatMessage .messageActions .btnUseTemplate:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(16, 185, 129, 0.4);
}

.aiChatMessage .messageActions .btnRetry {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.aiChatMessage .messageActions .btnRetry:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(245, 158, 11, 0.4);
}

.aiChatMessage .messageActions .btnRestore {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.aiChatMessage .messageActions .btnRestore:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(239, 68, 68, 0.4);
}

/* ============================================
   Chat Input Area
   ============================================ */
.aiChatInputArea {
    padding: 12px;
    background: white;
    flex-shrink: 0;
}

.aiChatInputArea .inputWrapper {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: #f5f5f5;
    border: none;
    border-radius: 20px;
    padding: 6px 6px 6px 14px;
    transition: box-shadow 0.2s ease;
}

.aiChatInputArea .inputWrapper:focus-within {
    box-shadow: none;
    outline: none;
}

.aiChatInputArea textarea {
    flex: 1;
    border: none !important;
    background: transparent !important;
    resize: none;
    font-size: 13px;
    font-family: inherit;
    line-height: 1.4;
    min-height: 20px;
    max-height: 100px;
    outline: none !important;
    box-shadow: none !important;
    padding: 4px 0;
}

.aiChatInputArea textarea:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.aiChatInputArea .btnSend {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.aiChatInputArea .btnSend:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.aiChatInputArea .btnSend:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.aiChatInputArea .btnSend svg {
    width: 14px;
    height: 14px;
}

/* ============================================
   Loading Indicator
   ============================================ */
.aiLoadingDots {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.aiLoadingDots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #999;
    animation: dotBounce 1.4s ease-in-out infinite;
}

.aiLoadingDots span:nth-child(1) { animation-delay: 0s; }
.aiLoadingDots span:nth-child(2) { animation-delay: 0.2s; }
.aiLoadingDots span:nth-child(3) { animation-delay: 0.4s; }

/* ============================================
   File Attachments
   ============================================ */
.aiFilePreviewArea {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
    animation: messageSlideIn 0.2s ease-out;
}

.aiFilePreviewItem {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: #f0f0f0;
    border-radius: 8px;
    font-size: 12px;
    max-width: 180px;
    position: relative;
}

.aiFilePreviewItem .fileThumb {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    object-fit: cover;
}

.aiFilePreviewItem .fileIcon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
}

.aiFilePreviewItem .fileName {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100px;
    color: #555;
}

.aiFilePreviewItem .fileRemove {
    cursor: pointer;
    color: #999;
    font-size: 12px;
    transition: color 0.2s;
    flex-shrink: 0;
}

.aiFilePreviewItem .fileRemove:hover {
    color: #e74c3c;
}

.aiChatInputArea .btnAttach {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.aiChatInputArea .btnAttach:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.08);
}

.aiChatInputArea .btnAttach svg {
    width: 14px;
    height: 14px;
}

/* Drag over state */
.aiChatPanel.dragOver {
    background: rgba(102, 126, 234, 0.05);
}

/* Drag overlay */
.aiDragOverlay {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(102, 126, 234, 0.12);
    backdrop-filter: blur(2px);
    border: 2px dashed #667eea;
    border-radius: 4px;
    pointer-events: none;
    animation: fadeIn 0.15s ease-out;
}

.aiDragOverlayContent {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 32px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.25);
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
}

.aiDragOverlayContent .aiDragIcon {
    font-size: 32px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Model selector */
.aiChatInputArea .modelSelector {
    background: transparent;
    border: none;
    font-size: 11px;
    color: #999;
    cursor: pointer;
    outline: none;
    padding: 2px 4px;
}

.aiChatInputArea .modelSelector:hover {
    color: #667eea;
}

/* ============================================
   AI Disclaimer
   ============================================ */
.aiChatInputArea .aiDisclaimer {
    text-align: center;
    font-size: 11px;
    color: #999;
    margin-top: 6px;
    line-height: 1.3;
}

/* ============================================
   Animations
   ============================================ */
@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes dotBounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================
   External Chat Mode — Toggle Switch
   ============================================ */
.aiChatPanel .chatHeader .externalModeToggle {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 500;
    opacity: 0.9;
}

.aiChatPanel .chatHeader .toggleLabel {
    display: flex;
    align-items: center;
    white-space: nowrap;
    user-select: none;
}

/* Toggle switch styles */
.toggleSwitch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 18px;
    flex-shrink: 0;
    margin: 0;
}

.toggleSwitch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggleSlider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    transition: 0.3s;
    border-radius: 18px;
}

.toggleSlider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggleSwitch input:checked + .toggleSlider {
    background-color: rgba(255, 255, 255, 0.6);
}

.toggleSwitch input:checked + .toggleSlider:before {
    transform: translateX(16px);
}

/* ============================================
   External Chat Mode — Banner
   ============================================ */
.externalModeBanner {
    background: linear-gradient(135deg, #fef3cd 0%, #fce8b2 100%);
    color: #856404;
    padding: 8px 16px;
    font-size: 11px;
    line-height: 1.4;
    border-bottom: 1px solid #f5c518;
    flex-shrink: 0;
    animation: messageSlideIn 0.3s ease-out;
}

/* ============================================
   External Chat Mode — Combined Prompt + Paste Block
   ============================================ */
.aiChatMessage .messageBubble.externalMode {
    max-width: 100%;
    padding: 12px;
    background: #f0f2f5;
    border: 1px solid #d0d4db;
    border-radius: 12px;
    overflow: visible;
}

.externalCombinedBlock {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── Step container ── */
.externalCombinedBlock .externalStep {
    border: 1px solid #dce0e5;
    border-radius: 8px;
    background: white;
    overflow: hidden;
}

.externalCombinedBlock .stepHeader {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    font-size: 11.5px;
    font-weight: 600;
    color: #444;
    background: #e9ecef;
    border-bottom: 1px solid #dce0e5;
}

.externalCombinedBlock .stepBadge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1;
}

.externalCombinedBlock .stepBody {
    display: flex;
    flex-direction: column;
}

/* ── Step 1: Prompt section ── */
.externalCombinedBlock .promptContent {
    max-height: 80px;
    overflow-y: auto;
    padding: 8px 12px;
    margin: 0;
    font-size: 10px;
    line-height: 1.4;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    color: #555;
    white-space: pre-wrap;
    word-break: break-word;
    background: #fafbfc;
}

.externalCombinedBlock .promptContent::-webkit-scrollbar {
    width: 4px;
}

.externalCombinedBlock .promptContent::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.externalCombinedBlock .btnCopyPrompt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 12px;
    border: none;
    background: #667eea;
    color: white;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.externalCombinedBlock .btnCopyPrompt:hover {
    background: #5a6fd6;
}

.externalCombinedBlock .btnCopyPrompt svg {
    width: 11px;
    height: 11px;
}

.externalCombinedBlock .externalFileWarning {
    padding: 8px 12px;
    font-size: 11px;
    line-height: 1.45;
    color: #856404;
    background: #fef9e7;
    border-top: 1px solid #f0e3a0;
}

/* ── Step 2: Paste section ── */
.externalCombinedBlock .pasteTextarea {
    width: 100%;
    min-height: 80px;
    max-height: 200px;
    padding: 8px 12px;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    font-size: 12px;
    line-height: 1.5;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    color: #333;
    background: #fafbfc !important;
    resize: vertical;
    box-sizing: border-box;
}

.externalCombinedBlock .pasteTextarea:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.externalCombinedBlock .btnProcessResponse {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px 14px;
    border: none;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0 0 7px 7px;
}

.externalCombinedBlock .btnProcessResponse:hover:not(:disabled) {
    opacity: 0.9;
}

.externalCombinedBlock .btnProcessResponse:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.externalCombinedBlock .btnProcessResponse svg {
    width: 11px;
    height: 11px;
}

/* ============================================
   Field autocomplete dropdown + field pills
   ============================================ */
.aiChatInputArea .inputWrapper {
    position: relative;
}

.aiFieldDropdown {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 6px);
    margin: 0;
    padding: 4px 0;
    list-style: none;
    max-height: 190px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
    z-index: 60;
}

.aiFieldDropdown li {
    padding: 7px 12px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.aiFieldDropdown li:hover,
.aiFieldDropdown li.highlighted {
    background: #eef1fe;
}

.aiFieldDropdown li .fieldMeta {
    color: #9a9a9a;
    font-size: 11px;
    white-space: nowrap;
}

/* Option sub-rows shown under a multiple-option field. */
.aiFieldDropdown li.aiOptionRow {
    padding-left: 26px;
    font-size: 12px;
}

.aiFieldDropdown li.aiOptionRow .aiOptionLabel {
    color: #444;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Non-selectable field header (e.g. the target field: only its options can be tagged). */
.aiFieldDropdown li.aiFieldGroupLabel {
    cursor: default;
    opacity: 0.65;
    font-weight: 600;
}

.aiFieldDropdown li.aiFieldGroupLabel:hover {
    background: transparent;
}

/* Option chip in the input: a lighter variant of the field chip. */
.aiChatInputArea .aiChatEditable .aiOptionChip,
.aiFieldPill.aiOptionPill {
    background: linear-gradient(135deg, #7f8ff4 0%, #9a6ec2 100%);
}

.aiFieldPill {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 10px;
    padding: 1px 8px;
    margin: 0 2px;
    font-size: 12px;
    line-height: 18px;
    white-space: nowrap;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
}

/* contenteditable input (replaces the textarea, supports field chips) */
.aiChatInputArea .aiChatEditable {
    flex: 1;
    min-height: 20px;
    max-height: 100px;
    overflow-y: auto;
    outline: none;
    font-size: 13px;
    line-height: 1.5;
    padding: 4px 0;
    word-break: break-word;
}

.aiChatInputArea .aiChatEditable:empty:before {
    content: attr(data-placeholder);
    color: #9a9a9a;
    pointer-events: none;
}

.aiChatInputArea .aiChatEditable .aiFieldChip {
    cursor: default;
    user-select: none;
}

/* Formula code block inside an assistant message */
.aiFormulaCode {
    background: #1e1e2e;
    color: #e6e6ef;
    padding: 8px 10px;
    border-radius: 6px;
    white-space: pre-wrap;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    margin-top: 8px;
    overflow-x: auto;
}

/* ============================================
   AI Side Panel - Slide-in Chat Side Panel
   ============================================ */

/* Side panel container */
.aiSidePanel {
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 2000000;
    width: 420px;
    max-width: 90vw;
    display: flex;
    flex-direction: column;
    background: #fafafa;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.18);
    animation-duration: 0.3s;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    animation-fill-mode: forwards;
}

/* Position variants */
.aiSidePanel.right {
    right: 0;
    animation-name: aiSidePanelSlideInRight;
    border-left: 1px solid rgba(102, 126, 234, 0.2);
}

.aiSidePanel.left {
    left: 0;
    animation-name: aiSidePanelSlideInLeft;
    border-right: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
}

/* Close button (inside header via headerRightSection) */
.aiSidePanelClose {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 14px;
    flex-shrink: 0;
    margin-left: 8px;
}

.aiSidePanelClose:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.1);
}

/* Override aiChatPanel sizing inside the side panel */
.aiSidePanel .aiChatPanel {
    width: 100%;
    min-width: unset;
    height: 100%;
    border-right: none;
    border-left: none;
}

/* ============================================
   Slide-out animations (for removal)
   ============================================ */
.aiSidePanel.closing.right {
    animation-name: aiSidePanelSlideOutRight;
    animation-duration: 0.2s;
    animation-timing-function: ease-in;
}

.aiSidePanel.closing.left {
    animation-name: aiSidePanelSlideOutLeft;
    animation-duration: 0.2s;
    animation-timing-function: ease-in;
}


/* ============================================
   Keyframes
   ============================================ */
@keyframes aiSidePanelSlideInRight {
    from {
        transform: translateX(100%);
        opacity: 0.5;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes aiSidePanelSlideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes aiSidePanelSlideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0.5;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes aiSidePanelSlideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

@keyframes aiSidePanelFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes aiSidePanelFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.rbt {
  outline: none;
}

.rbt-menu {
  margin-bottom: 2px;
}

.rbt-menu > li a {
  overflow: hidden;
  text-overflow: ellipsis;
}

.rbt-menu > li a:focus {
  outline: none;
}

.rbt-menu-pagination-option {
  text-align: center;
}

.rbt .rbt-input-main::-ms-clear {
  display: none;
}

.rbt-input-multi {
  cursor: text;
  overflow: hidden;
  position: relative;
  height: auto;
}

.rbt-input-multi.focus {
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
  border-color: #66afe9;
  outline: 0;
}

.rbt-input-multi.form-control[disabled] {
  background-color: #e9ecef;
  opacity: 1;
}

.rbt-input-multi input::-moz-placeholder {
  color: #999;
  opacity: 1;
}

.rbt-input-multi input:-ms-input-placeholder {
  color: #999;
}

.rbt-input-multi input::-webkit-input-placeholder {
  color: #999;
}

.rbt-input-multi .rbt-input-wrapper {
  margin-bottom: -4px;
  margin-top: -1px;
  overflow: hidden;
}

.rbt-input-multi .rbt-input-main {
  height: 20px;
  margin: 1px 0 4px;
}

.rbt-input-multi .rbt-input-hint-container {
  display: inline-block;
}

.rbt-input-multi.input-lg .rbt-input-main, .rbt-input-multi.form-control-lg .rbt-input-main {
  height: 24px;
}

.rbt-input-multi.input-sm .rbt-input-main, .rbt-input-multi.form-control-sm .rbt-input-main {
  height: 18px;
}

.rbt-close {
  z-index: 1;
}

.rbt-close-lg {
  font-size: 24px;
}

.rbt-token {
  background-color: #e7f4ff;
  border: 0;
  border-radius: 2px;
  color: #1f8dd6;
  display: inline-block;
  line-height: 1em;
  margin: 0 3px 3px 0;
  padding: 4px 7px;
  position: relative;
}

.rbt-token-disabled {
  background-color: #ddd;
  color: #888;
  pointer-events: none;
}

.rbt-token-removeable {
  cursor: pointer;
  padding-right: 21px;
}

.rbt-token-active {
  background-color: #1f8dd6;
  color: #fff;
  outline: none;
  text-decoration: none;
}

.rbt-token .rbt-token-remove-button {
  bottom: 0;
  color: inherit;
  font-size: inherit;
  font-weight: normal;
  opacity: 1;
  outline: none;
  padding: 3px 7px;
  position: absolute;
  right: 0;
  text-shadow: none;
  top: -2px;
}

.rbt-loader {
  -webkit-animation: loader-animation 600ms infinite linear;
  -o-animation: loader-animation 600ms infinite linear;
  animation: loader-animation 600ms infinite linear;
  border: 1px solid #d5d5d5;
  border-radius: 50%;
  border-top-color: #1f8dd6;
  display: block;
  height: 16px;
  width: 16px;
}

.rbt-loader-lg {
  height: 20px;
  width: 20px;
}

.rbt-aux {
  display: -webkit-box;
  display: -moz-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
  align-items: center;
  bottom: 0;
  justify-content: center;
  pointer-events: none;
  /* Don't block clicks on the input */
  position: absolute;
  right: 0;
  top: 0;
  width: 34px;
}

.rbt-aux-lg {
  width: 46px;
}

.rbt-aux .rbt-close {
  margin-top: -4px;
  pointer-events: auto;
  /* Override pointer-events: none; above */
}

.has-aux .rbt-input {
  padding-right: 34px;
}

.rbt-highlight-text {
  background-color: inherit;
  color: inherit;
  font-weight: bold;
  padding: 0;
}

/* Input Groups */
.input-group > .rbt {
  -webkit-box-flex: 1;
  -moz-box-flex: 1;
  -webkit-flex: 1;
  -ms-flex: 1;
  flex: 1;
}

.input-group > .rbt .rbt-input-hint-container {
  display: -webkit-box;
  display: -moz-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
}

.input-group > .rbt .rbt-aux,
.input-group > .rbt .rbt-input-hint {
  z-index: 5;
}

.input-group > .rbt:not(:first-child) .form-control {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.input-group > .rbt:not(:last-child) .form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

/* Validation States */
.has-error .rbt-input-multi.focus {
  border-color: #843534;
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
}

.has-warning .rbt-input-multi.focus {
  border-color: #66512c;
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;
  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;
}

.has-success .rbt-input-multi.focus {
  border-color: #2b542c;
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;
  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;
}

@keyframes loader-animation {
  to {
    transform: rotate(1turn);
  }
}

@-webkit-keyframes loader-animation {
  to {
    -webkit-transform: rotate(1turn);
  }
}

.rbt-menu {
    z-index: 10000000000000;
    background-color: white;
    padding: 5px;
}

.rbt-input-wrapper{
    width:100%;
}

.rbt-input-wrapper input{
    width:100%;
    height: 23.5px !important;
}

.rbt-token-removeable{
    padding-right: 20px !important;
    margin: 0 5px 0 0;
}

.rbt-input-multi{
    width:100%;
    border:1px solid #dfdfdf;
    padding:6px 12px;
    border-radius: 4px;
}

.rbt-menu.dropdown-menu{
    margin-top: 0;
    padding:5px 0;
    border: #ccc 1px solid;
    border-radius: 4px;
}

.rbt-menu .dropdown-item{
    display: block;
    padding: 3px 12px;
}

.rbt-input-multi .rbt-input-main{
    margin-bottom: 0 !important;
}

.rbt-menu li {
    margin: 0;
}

.rbt-menu li a{
    color:black;
    font-size: 15px;
    line-height: 19px;
    text-decoration: none;
}


.rbt-menu .dropdown-menu>li>a:focus, .dropdown-menu>li>a:hover {
    color: #262626;
    text-decoration: none;
    background-color: #f5f5f5;
}

.rbt-token-remove-button{
    background:0;
    border:none;
}

.rbt-token-remove-button:hover{
    cursor: pointer;
}
.react-tooltip-lite{
    z-index: 100000 !important;
}
.slateRendererItem .rnSelected{
    border:3px solid rgba(147,195,217,1);
 }

.slateRendererItem .rnUnselected{
    border:3px solid transparent;
}

.slateRendererItem{
    display: inline-block;
}
.slateTextContainer.emailRenderer
{
    padding:5px !important;
}

.slateTextContainer.emailRenderer>div
{
    padding:5px !important;
}
.SlateButton:hover{
   border:1px solid #8f8f8f;
}

.SlateButton{
    border:1px solid transparent;
    transition: border 200ms ease-in-out;
}
.SlateField{
    user-select:none;
    cursor:pointer;
    background-color:#f9f9f9;
    padding:0px 2px;
    border:1px solid #dfdfdf;
    max-width:170px;
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
}

.SlateField.rnFieldSelected{
    background-color: #4d80e4;
    color:white;
    border-color: #679AFE;
}
.SlateTemplate{
    user-select:none;
    cursor:pointer;
    background-color:#effcef;
    padding:0px 2px;
    border:1px solid #94d3ac;
    max-width:170px;
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
}

.SlateTemplate.rnFieldSelected{
    background-color: #4d80e4;
    color:white;
    border-color: #679AFE;
}
.rnTabItem .rnRemoveEmailIcon{
    opacity: 0;
    transition: opacity 200ms ease-in-out;
}

.rnTabItem:hover .rnRemoveEmailIcon{
    opacity: 1;
}


.rnRemoveEmailIcon,.rnEmailAdd{
    font-size: 15px;
    color: black;
    transition: color 200ms ease-in-out;
}



.rnRemoveEmailIcon:hover,.rnEmailAdd:hover{
    color: red;
}
