 /* global form css */
 .globalAiContainer {
     display: flex;
     gap: 60px;
 }

 #globalAiSettingForm {
     display: none;
 }

 .globalAiSetting {
     background: #fff;
     padding: 11px 20px 20px 20px;
     margin: 20px 20px;
     /* border: 1px solid #0000000f; */
     width: 100%;
     flex-grow: 1;
     /* box-shadow: 1px 6px 6px 1px #00000005; */
     overflow-y: auto;
     scrollbar-width: thin;
     max-height: 60vh;
     scrollbar-color: #ccc transparent;
 }

 .globalAiSetting h4 {
     color: #555 !important;
     line-height: 1.4em;
     font-weight: bold;
     font-size: 14px;
     padding-bottom: 16px;
     text-align: center;
 }


 .moreLinkBtn {
     color: #08489f;
     text-decoration: underline !important;
     text-decoration-color: #08489f !important;
     cursor: pointer;
 }

 a.moreLinkBtn i {
     font-size: 11px;
     letter-spacing: 0.2em;
 }

 .moreLinkBtn:hover {
     color: #00447b;
 }

 .urlRow {
     display: flex;
     align-items: center;
     gap: 8px;
 }



 .removeOption {
     color: red;
     cursor: pointer;
     font-size: 20px;
     line-height: 1;
     padding-right: 0px;
     margin: 0px !important;
 }

 .globalAiSetting .inputRead {
     background: #8080800f;
     padding-left: 10px !important;
     padding-right: 10px !important;
 }

 .navbtns {
     position: fixed;
     bottom: 16px;
     z-index: 999;
     padding: 0 0 0 30px;
     display: flex;
     gap: 3px;
 }

 .setupDiv {
     padding: 10px 20px !important;
     border: 1px solid #80808030;
     border-radius: 10px;
     /* box-shadow: 1px 6px 10px 1px #80808030; */
     height: 100%;
 }

 .setupDiv h4 {
     text-align: left !important;
     color: #555 !important;
     line-height: 0.1em !important;
     font-weight: bold !important;
     font-size: 15px !important;
     padding-bottom: 16px !important;
     text-align: left !important;
     padding-top: 16px !important;
     margin: 0px !important;
 }

 .setupDiv span {
     color: #333;
     line-height: 1em !important;
 }

 .insiderUploadDiv {
     padding: 10px;
     border: 2px dashed #dadada;
     border-radius: 10px;
 }

 .fileInfo ul li {
     text-align: left;
     text-decoration: none !important;
     color: #0000008f !important;
     line-height: 1.6em;
     font-size:13px;
 }

 .upload-box .file-input {
     display: none;
     /* hide native file input */
 }

 .upload-box p {
     margin-bottom: 0.5rem;
 }

 .upload-box .uploaded-flle {
     font-weight: 600;
     margin-bottom: 0.5rem;
     color: #212529;
 }

 .upload-box h5 {
     color: #000 !important;
     line-height: 1.2em;
 }

 .downloadDoc {
     width: 95%;
     display: flex;
     justify-content: end;
 }

 .insiderUploadDiv {
     padding: 10px;
     border: 2px dashed #dadada;
     border-radius: 10px;
 }

 .downloadLink {
     background: none !important;
     color: #2929e3 !important;
     float: right;
     margin: 10px 0px 10px 0px;
     text-decoration: underline !important;
 }

 .removeDoc {
     color: red;
     cursor: pointer;
     font-size: 20px;
     padding-right: 0;
     padding-top: 7px;
     background: rgb(255, 255, 255) !important;
 }

 .ai_indication_text {
     margin-right: 10px;
     font-weight: 700;
 }

 .globalInput {
     width: 95%;
 }

 .upload-box h5 {
     color: #000 !important;
     line-height: 1.2em;
 }

 .downloadDoc {
     width: 95%;
     display: flex;
     justify-content: end;
 }

 .insiderUploadDiv {
     padding: 10px;
     border: 2px dashed #dadada;
     border-radius: 10px;
 }

 .downloadLink {
     background: none !important;
     color: #2929e3 !important;
     float: right;
     margin: 10px 0px 10px 0px;
     text-decoration: underline !important;
 }

 .removeDoc {
     color: red;
     cursor: pointer;
     font-size: 20px;
     padding-right: 0;
     padding-top: 7px;
     background: rgb(255, 255, 255) !important;
 }

 .ai_indication_text {
     margin-right: 10px;
     font-weight: 700;
 }

 .globalInput {
     width: 95%;
 }

 .upload-box svg {
     color: #0d6efd;
     margin-bottom: 1rem;
 }

 .upload-box .btn-choose-file {
     display: inline-block;
     padding: 10px 20px;
     background-color: #0d6efd;
     color: #fff;
     border: none;
     border-radius: 0.5rem;
     cursor: pointer;
     font-size: 14px;
     margin-bottom: 1rem;
     transition: background 0.2s ease-in-out;
 }

 .upload-box .btn-choose-file:hover {
     background-color: #0b5ed7;
 }

 .additionalUrlWarning,
 .partnerUrlWarning {
     display: block;
     opacity: 0;
     visibility: hidden;
     transition: opacity 0.6s ease, visibility 0.6s ease;
     color: #ff4b4b;
 }

 .additionalUrlWarning.show {
     opacity: 1;
     visibility: visible;
     color: #ff4b4b;
 }

 .partnerUrlWarning.show {
     opacity: 1;
     visibility: visible;
     color: #ff4b4b;
 }

 #aiGlobalModalLabel {
     text-transform: uppercase;
     font-size: 14px;
 }

 .uploadDoc {
     border: 1px solid #0000ff17;
     border-radius: 4px;
     padding: 24px 10px;
     background: #0c47a91a;
     justify-content: space-between;
 }

 .uploadDoc a {
    color: #555;
    font-weight: 500;
    text-decoration: none !important;
    word-wrap: break-word;
    white-space: normal;
    display: inline-block;
    max-width: 270px;
    font-size: 12px;
 }

 .uploadDoc p {
     position: absolute;
     left: 70px;
     display: grid;
 }

 .uploadDoc .feather.feather-file-text {
     color: #009fffbd;
 }

 .uploadDoc p span {
     color: #333333b0;
     line-height: 1.4em !important;
     font-size: 13px;
     font-weight: 500;
    font-size: 12px;
 }
.uploadDoc button {
    font-size: 10px;
}
 .fileInfo {
     border-top: 1px solid #80808017;
     padding: 17px 0 0 0;
     margin-top: 20px;
 }

 .fileInfo ul {
     list-style: none;
     padding: 0px;
 }

 /* global form css end here */
 
 
 .overlay-loader {
     position: fixed;
     top: 0;
     left: 0;
     width: 100vw;
     height: 100vh;
     background-color: rgba(244, 246, 248, 0.9);
     /* Light overlay with slight dim */
     z-index: 9999;
     display: none;
     align-items: center;
     justify-content: center;
 }
 .loading-box {
     background-color: #fff;
     padding: 30px 40px;
     border-radius: 12px;
     box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
     text-align: center;
     max-width: 600px;
     width: 100%;
 }
 .loading-title {
     font-size: 18px;
     font-weight: bold;
     margin-bottom: 10px;
     color: #2a6ebb;
 }
 .loading-description {
     font-size: 14px;
     color: #555;
     margin-bottom: 20px;
	 line-height:26px;
 }
 .dot-loader {
     display: flex;
     justify-content: center;
     gap: 8px;
 }

 .dot {
     width: 12px;
     height: 12px;
     border-radius: 50%;
     background-color: #ccc;
     animation: blink 1.5s infinite ease-in-out;
 }

 .dot:nth-child(1) {
     animation-delay: 0s;
 }

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

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

 @keyframes blink {

     0%,
     80%,
     100% {
         background-color: #ccc;
     }

     40% {
         background-color: #2a6ebb;
     }
 }

 .frontendErrorDiv {
     color: #cc2e2e;
 }

 .nothingChanged {
     opacity: 1;
     visibility: visible;
     color: #ff4b4b;
 }

 .requiredIcon {
     color: red!important;
     font-weight: bold!important;
 }
 .saveglobalbtn {
     margin-top: 0%;
     border-top: 1px solid #e9e9ef;
     padding: 20px;
 }
 .save-sec-button {
     background: #00bd88;
     color: #fff;
 }
  .save-sec-button:hover {
      background: #00bd88;
      color: #fff;
  }

  









/* 4-5-2026 */
/* CONTAINER */
.aii-container {
    font-family: Arial, sans-serif;
    padding: 20px;
    background: #f8fafc;
    color: #1f2937;
}

/* HEADER */
.aii-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.aii-header-row h2 {
    margin: 0 0 6px 0;
    font-size: 22px;
    font-weight: 700;
    color: #111827;
}

.aii-header-row h2 i {
    margin-right: 8px;
    color: #374151;
}

.aii-header-row p {
    color: #6b7280;
    margin: 0;
    font-size: 13px;
}

/* SUMMARY BAR */
.aii-summary-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    padding: 16px 20px;
    border-radius: 10px;
    margin: 0 0 16px 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.aii-summary-icon {
    width: 44px;
    height: 44px;
    background: #eef4ff;
    color: #2a6ebb;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.aii-summary-stats {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.aii-summary-line {
    font-size: 14px;
    color: #374151;
}

.aii-summary-num {
    font-weight: 700;
    color: #111827;
    font-size: 16px;
}

.aii-summary-label {
    color: #4b5563;
    margin-left: 4px;
}

/* SAVE BUTTON */
.aii-save-btn {
    /* background: #e5e7eb; */
    /* color: #374151; */
    border: none;
    padding: 10px 22px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s ease;
}

.aii-save-btn:hover {
    background: #d1d5db;
}

/* TIP */
.aii-tip {
    background: #eef4ff;
    border: 1px solid #dbeafe;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
    color: #4b5563;
}

.aii-tip i {
    color: #2a6ebb;
    margin-right: 6px;
}

/* MAIN LAYOUT */
.aii-layout {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 20px;
    align-items: start;
}

.aii-right-col {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* PANEL */
.aii-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 22px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.aii-panel h4 {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 700;
    color: #111827 !important;
    text-align: left;
    line-height: 1.3em;
    padding-bottom: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.aii-panel-icon {
    color: #2a6ebb;
    font-size: 16px;
}

.aii-icon-warn {
    color: #f59e0b;
}

/* TEXT */
.aii-muted {
    color: #6b7280;
    font-size: 13px;
    margin: 0 0 16px 0;
}

.aii-italic {
    font-style: italic;
}

.aii-label {
    font-size: 11px;
    color: #6b7280;
    margin: 18px 0 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.5px;
    font-weight: 600;
    text-transform: uppercase;
}

.aii-label i {
    font-size: 12px;
    color: #9ca3af;
}

/* ITEMS — flat rows, no boxes */
.aii-item {
    padding: 8px 4px;
    border: none;
    border-radius: 0;
    margin-bottom: 2px;
    font-size: 14px;
    background: transparent;
    font-weight: 500;
    transition: background 0.15s ease;
}

.aii-item:hover {
    background: #f9fafb;
}

.aii-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    cursor: pointer;
    color: #1f2937;
    font-weight: 500;
    width: 100%;
}

.aii-item input[type="checkbox"] {
    width: 12px;
    height: 18px;
    accent-color: #1f2937;
    cursor: pointer;
    flex-shrink: 0;
}

.aii-meta {
    color: #9ca3af;
    font-weight: 400;
    font-size: 13px;
    margin-left: 4px;
}

.aii-row-icon {
    color: #9ca3af;
    font-size: 13px;
}

/* SUB BOX (radio section) */
.aii-sub-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    padding: 14px 16px;
    border-radius: 8px;
    margin-top: 12px;
}

.aii-sub-box h5 {
    margin: 0 0 10px 0;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
}

.aii-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    color: #6b7280;
    font-size: 13px;
    cursor: pointer;
    margin: 0;
}

.aii-radio input[type="radio"] {
    accent-color: #2a6ebb;
    cursor: pointer;
}

.aii-radio-selected {
    color: #111827;
    font-weight: 500;
}

/* SUBHEAD inside external sources */
.aii-subhead {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin: 14px 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f3f4f6;
}

.aii-subhead i {
    color: #9ca3af;
    margin-right: 6px;
}

.aii-subhead-secondary {
    margin-top: 18px;
}

.aii-counter {
    color: #6b7280;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
}

.aii-empty {
    color: #9ca3af;
    font-size: 13px;
    font-style: italic;
    margin: 4px 0 14px 0;
}

.aii-empty-row {
    color: #9ca3af;
    font-size: 13px;
    font-style: italic;
    padding: 6px 4px 10px 4px;
}

/* SCROLL AREA */
.aii-scroll {
    max-height: 240px;
    overflow-y: auto;
    padding-right: 5px;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

.aii-scroll::-webkit-scrollbar {
    width: 6px;
}

.aii-scroll::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.aii-item-flat {
    padding: 6px 4px;
}

/* WARNING TEXT */
.aii-warning {
    color: #dc2626;
    font-size: 13px;
    margin: 0 0 12px 0;
}

/* UPLOAD BOX */
.aii-upload-box {
    border: 1.5px dashed #d1d5db;
    padding: 14px;
    text-align: center;
    border-radius: 8px;
    /* background: #fafafa; */
    margin-top: 14px;
    cursor: pointer;
    /* color: #4b5563; */
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s ease;
}



.aii-upload-box i {
    margin-right: 6px;
}

/* MODE TABS (Pre-AI / Post-AI) */
.aii-mode-tabs {
    display: inline-flex;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 4px;
    gap: 2px;
}

.aii-tab {
    background: transparent;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
    transition: all 0.15s ease;
}

.aii-tab:hover {
    color: #111827;
}

.aii-tab-active {
    background: #1e3a8a;
    color: #fff;
}

.aii-tab-active:hover {
    color: #fff;
}

/* URL BOX (partner website input look) */
.aii-url-box {
    margin-bottom: 6px;
}

.aii-url-input {
    width: 100%;
    padding: 10px 12px;
    background: #f3f6fb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #1d4ed8;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s ease;
}

.aii-url-input:focus {
    border-color: #4A6CF7;
    background: #fff;
}

.aii-url-input::placeholder {
    color: #9ca3af;
}

/* DISCOVER PLACEHOLDER (Discovered after AI generation) */
.aii-discover-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 14px;
    color: #9ca3af;
    font-size: 13px;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 8px;
}

.aii-discover-box i {
    color: #cbd5e1;
}

/* DISABLED PLAN CARD */
.aii-disabled-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px 18px;
    margin: 6px 0 18px 0;
}

.aii-bullet-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
}

.aii-bullet-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    color: #6b7280;
    font-size: 14px;
}

.aii-bullet-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #cbd5e1;
    display: inline-block;
    flex-shrink: 0;
}

.aii-disabled-note {
    color: #9ca3af;
    font-size: 12px;
    font-style: italic;
    margin: 8px 0 0 0;
    padding-top: 10px;
    border-top: 1px solid #f3f4f6;
}

/* GENERATE INITIAL PLAN BUTTON */
.aii-generate-btn {
    width: 100%;
    background: #1e3a8a;
    color: #fff;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.15s ease;
}

.aii-generate-btn:hover {
    background: #1e40af;
}

.aii-generate-btn i {
    font-size: 14px;
}

/* URL ROW (input + Add button) */
.aii-url-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}

.aii-url-row .aii-url-input {
    flex: 1;
}

.aii-add-btn {
    border: 1px solid #e5e7eb;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}



/* UPLOAD BUTTONS ROW */
.aii-upload-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.aii-upload-btn {
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    padding: 12px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.15s ease;
}

.aii-upload-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #111827;
}

.aii-upload-btn i {
    color: #6b7280;
    font-size: 13px;
}

/* UTIL */
.mt-20 {
    margin-top: 20px;
}


.aii-item-doc-label {
    background: #F5F9FF; /* soft blue */
    border: 1px solid #dbeafe;
}

/* Highlight each file item */
.aii-item-doc-label {
    background: #ffffff;
    border: 1px solid #c7d2fe;
    padding: 3px 4px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

/* Hover effect */
.aii-item-doc-label  {
    background: #EEF4FF;
    border-color: #6366f1;
    transform: translateY(-1px);
}

/* Optional: add left accent line */
.aii-item-doc-label {
    border-left: 4px solid #4A6CF7;
    margin-bottom: 10px;
}



.source-sections {
    max-height: 220px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 6px 4px 2px;
    margin-bottom: 8px;
    border: 1px solid #eef2f7;
    border-radius: 8px;
    background: #fafbfc;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.source-sections::-webkit-scrollbar {
    width: 6px;
}

.source-sections::-webkit-scrollbar-track {
    background: transparent;
}

.source-sections::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.source-sections::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Tighten item rows inside the scroller so more fit per viewport */
.source-sections .aii-item {
    padding: 6px 6px;
    margin-bottom: 0;
    border-bottom: 1px solid #f1f5f9;
}

.source-sections .aii-item:last-child {
    border-bottom: none;
}

.source-sections .aii-item label {
    font-size: 13px;
    line-height: 1.4;
    word-break: break-word;
}

/* When the section is empty, drop the box chrome — discover-box has its own. */
.source-sections:has(> .aii-discover-box) {
    border: none;
    background: transparent;
    padding: 0;
}

.aii-source-list {
    margin-top: 8px;
}

.aii-source-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 4px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 13px;
}

.aii-source-row:last-child {
    border-bottom: none;
}

.aii-source-name {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    color: #1f2937;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aii-source-name i {
    color: #6b7280;
    font-size: 13px;
    flex-shrink: 0;
}

.aii-source-name span,
.aii-source-name a {
    color: #1f2937;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aii-source-name a:hover {
    color: #2a6ebb;
    text-decoration: underline;
}

.aii-source-meta {
    color: #9ca3af;
    font-size: 12px;
    margin-left: 4px;
    flex-shrink: 0;
}

.aii-source-tag {
    color: #2a6ebb;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.aii-source-remove {
    color: #9ca3af;
    text-decoration: none;
    font-size: 16px;
    line-height: 1;
    padding: 0 4px;
    flex-shrink: 0;
    visibility: hidden;
    transition: color 0.15s ease;
}

.aii-source-row:hover .aii-source-remove {
    visibility: visible;
}

.aii-source-remove:hover {
    color: #dc2626;
}


.section-sources-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 14px 4px 6px;
    border: 1.5px solid #e5e7eb;
    border-radius: 9999px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
    transition: background 0.15s ease, border-color 0.15s ease;
    user-select: none;
    margin-top: 10px;
}
.section-sources-pill:hover {
    background: #f9fafb;
    border-color: #cbd5e1;
}
.section-sources-favicons {
    display: inline-flex;
    align-items: center;
}
.section-sources-favicon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    border: 1.5px solid #fff;
    margin-left: -6px;
    object-fit: contain;
    box-shadow: 0 0 0 1px #e5e7eb;
}
.section-sources-favicon:first-child {
    margin-left: 0;
}
.section-sources-count {
    font-weight: 600;
    color: #111827;
}


.section-sources-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 380px;
    max-width: 100vw;
    background: #fff;
    border-left: 1px solid #e5e7eb;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.06);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.section-sources-drawer.open {
    transform: translateX(0);
}
.section-sources-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
    flex-shrink: 0;
}
.section-sources-drawer-header h5 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}
.section-sources-drawer-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    font-size: 18px;
    padding: 4px 10px;
    border-radius: 6px;
    line-height: 1;
    transition: background 0.15s ease, color 0.15s ease;
}
.section-sources-drawer-close:hover {
    background: #f3f4f6;
    color: #111827;
}
.section-sources-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.section-sources-drawer-body::-webkit-scrollbar {
    width: 6px;
}
.section-sources-drawer-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}


body {
    transition: padding-right 0.25s ease;
}
body.section-sources-drawer-open {
    padding-right: 380px;
}
@media (max-width: 768px) {
    .section-sources-drawer {
        width: 100vw;
    }
    body.section-sources-drawer-open {
        padding-right: 0;     /* full overlay on small screens */
        overflow: hidden;
    }
}

/* Section-sources list (used inside the drawer) */
.section-sources-group {
    margin-bottom: 18px;
}
.section-sources-group:last-child {
    margin-bottom: 0;
}
.section-sources-group-title {
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-sources-group-title i {
    color: #2a6ebb;
}
.section-sources-group-count {
    background: #f3f4f6;
    color: #374151;
    padding: 1px 8px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}
.section-sources-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.section-sources-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #f3f4f6;
    border-radius: 8px;
    text-decoration: none !important;
    color: #1f2937;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.section-sources-item:hover {
    background: #f9fafb;
    border-color: #cbd5e1;
    color: #2a6ebb;
}
.section-sources-item-favicon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    object-fit: contain;
}
.section-sources-item-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}
.section-sources-item-title {
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.section-sources-item-host {
    font-size: 12px;
    color: #6b7280;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.transcript-btn{
    height:45px;
}


.aidi-container {
    /* Inherit the frontend's typography (IBM Plex Sans, 0.875rem)
       from Bootstrap's --bs-body-* variables so this page matches
       the rest of the application instead of falling back to Arial. */
    font-family: var(--bs-body-font-family, "IBM Plex Sans", sans-serif);
    font-size: var(--bs-body-font-size, 0.875rem);
    line-height: var(--bs-body-line-height, 1.5);
    color: #1f2937;
    background: #f4f6f8;
    padding: 0 0 24px 0;
}

/* Force every descendant element (section headers, list-item
   titles, URLs, anchors, inputs, buttons, etc.) to use the same
   font-family as .aidi-container. Without this !important, the
   user-agent default for <a>, <h3>, <input>, and <button> can
   render in slightly different metrics and make the inventory
   page look typographically inconsistent. */
.aidi-container,
.aidi-container *:not(i):not([class*="fa-"]) {
    font-family: var(--bs-body-font-family, "IBM Plex Sans", sans-serif) !important;
}
/* Font Awesome icons keep their own glyph font (otherwise they
   render as empty boxes). */
.aidi-container i.fa,
.aidi-container i[class*="fa-"],
.aidi-container i.fa-solid,
.aidi-container i.fa-regular,
.aidi-container i.fa-brands,
.aidi-container i.fa-light,
.aidi-container i.fa-duotone {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "Font Awesome 6 Pro", "Font Awesome 5 Free", "Font Awesome 5 Brands" !important;
}

/* CARDS */
.aidi-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    /* padding: 20px 22px; */
    padding: 0px 0px;
    /* margin: 16px 0; */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* Still referenced by JS to collapse the detail panel */
.aidi-details-collapsed {
    display: none !important;
}



/* ============ TYPES GRID (used by both partner & user-provided sections) ============ */

.aidi-types-grid {

    display: grid;
    gap: 12px;
    margin-bottom: 4px;
     padding: 7px 12px 17px 16px;
}

.aidi-types-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.aidi-types-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.aidi-types-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 1100px) {
    .aidi-types-grid-4,
    .aidi-types-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .aidi-types-grid-4,
    .aidi-types-grid-3,
    .aidi-types-grid-2 {
        grid-template-columns: 1fr;
    }
}

.aidi-type-card {
    position: relative;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 12px 12px 12px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    min-height: 130px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.aidi-type-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.aidi-type-card.aidi-type-active {
    border: 2px solid #111827;
    background: #f9fafb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.aidi-type-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.aidi-type-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    display: inline-block;
}

.aidi-type-status-ready {
    background: #16a34a;
}

.aidi-type-caret {
    color: #9ca3af;
    font-size: 11px;
}

.aidi-type-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #eef4ff;
    color: #2a6ebb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-top: 2px;
}

.aidi-type-icon-red {
    background: #fef2f2;
    color: #dc2626;
}

.aidi-type-active .aidi-type-icon {
    background: #1e3a8a;
    color: #fff;
}

.aidi-type-title {
    margin: 4px 0 2px 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #111827 !important;
    line-height: 1.25em !important;
    padding: 0 !important;
    text-align: left !important;
}

.aidi-type-count {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
}

.aidi-type-count strong {
    font-size: 16px;
    color: #111827;
    font-weight: 700;
    margin-right: 2px;
}

/* ============ QUANTITY BAR ============ */

.aidi-quantity-block {
    background: #f9fafb;
    /* Sits flush between the Trusted Sources card and the Detail
       Panel — same horizontal margins, square corners, side borders
       only, so the three together read as one continuous region. */
    border: 1px solid #e5e7eb;
    border-top: none;
    border-bottom: none;
    border-radius: 0;
    padding: 12px 18px;
    margin: 0 10px;
}

.aidi-quantity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 10px;
}

.aidi-quantity-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #1f2937;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.aidi-quantity-title i {
    color: #16a34a;
}

.aidi-quantity-meta {
    font-size: 12px;
    color: #6b7280;
}

.aidi-quantity-percent {
    color: #16a34a;
    font-weight: 600;
    margin-left: 10px;
    transition: color .2s ease;
}

.aidi-quantity-percent-tier-red,
.aidi-quantity-percent-tier-red i   { color: #dc2626 !important; }
.aidi-quantity-percent-tier-orange,
.aidi-quantity-percent-tier-orange i { color: #f5a623 !important; }
.aidi-quantity-percent-tier-green,
.aidi-quantity-percent-tier-green i  { color: #16a34a !important; }

.aidi-quantity-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.aidi-quantity-fill {
    height: 100%;
    background: linear-gradient(90deg, #1e3a8a, #2a6ebb);
    border-radius: 999px;
    transition: width 0.3s ease;
}

/* ============ DETAIL PANEL ============ */

.aidi-detail-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    /* Visually continuous with the Trusted Sources card above —
       flat top edge + a thin accent band so the panel reads as the
       consolidated detail of whichever tile the user just clicked,
       not a separate floating section. */
    border-radius: 0 0 10px 10px;
    border-top: 3px solid #16a34a;
    margin: -1px 10px 14px 10px;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 60vh;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.aidi-detail-panel::-webkit-scrollbar { width: 6px; }
.aidi-detail-panel::-webkit-scrollbar-track { background: transparent; }
.aidi-detail-panel::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.aidi-detail-panel::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

.aidi-detail-panel-collapsed .aidi-detail-body,
.aidi-detail-panel-collapsed .aidi-detail-subheader {
    display: none !important;
}

.aidi-detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #fff;
    border-bottom: 1px solid #f3f4f6;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

.aidi-detail-panel:has(.aidi-detail-section-header) > .aidi-detail-header,
.aidi-detail-panel:has(.aidi-detail-section-header) > .aidi-detail-subheader {
    display: none;
}

.aidi-detail-title {
    font-size: 13px;
    color: #374151;
    flex: 1;
    min-width: 200px;
}

.aidi-detail-active-name {
    color: #1d4ed8;
    font-weight: 600;
}

.aidi-detail-search {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 4px 10px;
    flex: 1;
    max-width: 280px;
}

.aidi-detail-search i {
    color: #9ca3af;
    font-size: 12px;
}

.aidi-detail-search input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 13px;
    flex: 1;
    color: #1f2937;
}

.aidi-detail-close {
    background: #f3f4f6;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 18px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .15s ease, color .15s ease, transform .15s ease;
}

.aidi-detail-close:hover {
    background: #ef4444;
    color: #fff;
    transform: scale(1.05);
}

.aidi-detail-close:active {
    transform: scale(0.95);
}

.aidi-detail-body {
    display: none;
    padding: 14px 16px;
    background: #fff;
}


.aidi-detail-body.aidi-detail-active {
    display: block;
}

.aidi-detail-url-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}

.aidi-detail-url-row .aii-url-input {
    flex: 1;
}

.aidi-detail-save-btn {
    background: #6b7280;
    color: #fff;
    border: none;
    padding: 0 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    height: 38px;
    transition: background 0.15s ease;
}

.aidi-detail-save-btn:hover {
    background: #4b5563;
}

.aidi-detail-empty {
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
    margin: 8px 0 0 0;
    padding: 8px 0;
}


.aidi-detail-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* ============ ADD EXTERNAL SOURCES ============ */

.aidi-external-card {
    margin: 14px 10px 10px 10px;
    padding: 0;
    overflow: hidden;
}

/* When the external-card header also carries the .aidi-inventory-heading
   class, it adopts the clean light-grey title bar look (icon + title +
   subtitle) used by the Trusted Sources card — instead of the legacy
   yellow warning band. The .aidi-additional-heading flag below pins the
   right-side cluster (badge + caret) to the far right while keeping the
   title block left-aligned, and makes the whole row clickable. */
.aidi-additional-heading {
    cursor: pointer;
    margin: 0 !important;
    /* Soft teal band — distinct from the grey Trusted Sources header,
       signals "external / additional" without warning-yellow alarm. */
    background: #f0fdfa !important;
    border: none !important;
    border-bottom: 1px solid #ccfbf1 !important;
    border-radius: 10px 10px 0 0 !important;
    padding: 12px 16px !important;
}
.aidi-additional-heading .aidi-inventory-heading-icon {
    background: #ccfbf1;
    color: #0d9488;
}
.aidi-additional-heading-text {
    flex: 1 1 auto;
    min-width: 0;
}
.aidi-additional-heading .aidi-external-right {
    margin-left: auto;
}

.aidi-external-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: #fffbeb;
    cursor: pointer;
    border-bottom: 1px solid #fde68a;
    flex-wrap: wrap;
    gap: 10px;
}

.aidi-external-title {
    font-size: 14px;
    font-weight: 600;
    color: #92400e;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.aidi-external-title i {
    color: #d97706;
}

.aidi-external-suffix {
    color: #b45309;
    font-weight: 400;
    font-style: italic;
    font-size: 12px;
}

.aidi-external-right {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.aidi-external-badge {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
}

.aidi-external-caret {
    color: #92400e;
    font-size: 12px;
}

.aidi-external-body {
    padding: 16px 18px 18px 18px;
    background: #fff;
}

.aidi-external-subtitle {
    margin: 0 0 4px 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #111827 !important;
    padding: 0 !important;
    text-align: left !important;
}

.aidi-external-desc {
    color: #6b7280;
    font-size: 13px;
    margin: 0 0 14px 0;
}

.aidi-find-sources-btn-wide {
    width: auto;
    background: #0D527C;
    color: #ffffff;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
    box-shadow: 0 4px 10px -3px rgba(13, 82, 124, 0.35);
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.aidi-find-sources-btn-wide:hover {
    background: #0a4267;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px -4px rgba(13, 82, 124, 0.45);
}
.aidi-find-sources-btn-wide:active {
    background: #083451;
    transform: translateY(0);
    box-shadow: 0 2px 6px -2px rgba(13, 82, 124, 0.35);
}

.aidi-find-sources-btn-wide i {
    color: #ffffff;
}


/* 24-hour cooldown — disabled button paired with a pill chip
   showing the time remaining. Keeps a friendly, on-brand look
   even when the action is unavailable. */
.aidi-find-sources-btn-wide:disabled,
.aidi-find-sources-btn-wide.is-cooldown {
    background: #0D527C;
    color: #ffffff;
    border: 1px solid transparent;
    cursor: not-allowed;
    opacity: 0.55;
    box-shadow: none;
    transform: none;
    filter: none;
}
.aidi-find-sources-btn-wide:disabled i,
.aidi-find-sources-btn-wide.is-cooldown i {
    color: #ffffff;
}

.aidi-find-sources-cooldown {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: -4px 0 12px;
    padding: 9px 14px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fcd34d;
    border-radius: 999px;
    color: #92400e;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.4;
    box-shadow: 0 2px 6px -2px rgba(217, 119, 6, 0.18);
}
.aidi-find-sources-cooldown i {
    color: #b45309;
    font-size: 13px;
    animation: aidi-cooldown-pulse 2s ease-in-out infinite;
}
.aidi-find-sources-cooldown strong {
    color: #78350f;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.65);
    padding: 1px 8px;
    border-radius: 6px;
    margin-left: 2px;
}

@keyframes aidi-cooldown-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.55; transform: scale(1.08); }
}

/* Inline row that pairs the "Find External Sources" button with the
   cooldown chip side-by-side. When not in cooldown, the button is the
   only child and keeps its full-width look. */
.aidi-find-sources-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.aidi-find-sources-row .aidi-find-sources-btn-wide {
    flex: 0 0 auto;
    width: auto;
    margin-bottom: 0;
}
.aidi-find-sources-row .aidi-find-sources-cooldown {
    flex: 0 1 auto;
    margin: 0;
    white-space: nowrap;
}

/* When the section has no external sources yet, centre the action row
   and show a friendly empty-state card below it. */
.aidi-external-body.is-empty .aidi-find-sources-row {
    justify-content: center;
    margin-bottom: 18px;
}

.aidi-external-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    padding: 28px 20px 30px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    margin-top: 4px;
}
.aidi-external-empty-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}
.aidi-external-empty-title i {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
    color: #0D527C;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-style: normal;
    box-shadow: 0 3px 8px -2px rgba(13, 82, 124, 0.25);
    flex-shrink: 0;
}
.aidi-external-empty-desc {
    margin: 0;
    max-width: 460px;
    font-size: 13px;
    line-height: 1.55;
    color: #64748b;
}
.aidi-external-empty-desc strong {
    color: #0D527C;
    font-weight: 600;
}
.aidi-find-sources-row--empty {
    margin-top: 6px;
    margin-bottom: 0 !important;
    justify-content: center;
}

.aidi-external-add-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.aidi-external-url-input {
    flex: 1;
    min-width: 240px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f3f6fb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0 12px;
}

.aidi-external-url-input i {
    color: #2a6ebb;
}

.aidi-external-url-input input {
    border: none;
    background: transparent;
    outline: none;
    flex: 1;
    padding: 10px 0;
    font-size: 13px;
    color: #1d4ed8;
}

.aidi-external-url-input input::placeholder {
    color: #9ca3af;
}

.aidi-external-upload-btn {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0 14px;
    font-size: 13px;
    color: #4b5563;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
    background-color: #ede8e8;
}




.aidi-external-list {
    margin-top: 8px;
}

.aidi-external-list .aii-source-row {
    border-bottom: 1px solid #f3f4f6;
    padding: 8px 4px;
}

.aidi-external-list .aii-source-row:last-child {
    border-bottom: none;
}

.aidi-external-empty {
    color: #6b7280;
    font-size: 12px;
}


.aidi-modal-header {
    align-items: center;
    background: linear-gradient(180deg, #f4faf8 0%, #ffffff 80%);
    border-bottom: 1px solid #e5e7eb !important;
}

.aidi-modal-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.aidi-modal-header-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #eef4ff;
    color: #2a6ebb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.aidi-modal-header-text {
    display: flex;
    flex-direction: column;
}

.aidi-modal-header-title {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    line-height: 1.3em !important;
}

.aidi-modal-header-subtitle {
    margin: 2px 0 0 0;
    font-size: 12px;
    color: #6b7280;
    font-style: italic;
}

/* ---- Partner Website (BLUE) ---- */
.aidi-type-card[data-card="partnerWebsite"] .aidi-type-icon {
    background: #eef4ff;
    color: #2a6ebb;
}
.aidi-type-card[data-card="partnerWebsite"] .aidi-type-count strong {
    color: #2a6ebb;
}
.aidi-type-card[data-card="partnerWebsite"]:hover,
.aidi-type-card[data-card="partnerWebsite"].aidi-type-active {
    border-color: #2a6ebb;
    background: #f5f9ff;
    box-shadow: 0 4px 12px rgba(42, 110, 187, 0.12);
}
.aidi-type-card[data-card="partnerWebsite"].aidi-type-active .aidi-type-icon {
    background: #2a6ebb;
    color: #fff;
}

.aidi-type-card[data-card="partnerWebsite"]:hover .aidi-type-icon,
.aidi-type-card[data-card="partnerWebsite"].aidi-type-active .aidi-type-icon {
    background: #2a6ebb;
    color: #fff;
}


/* ---- Files Found on Partner Website (PURPLE) ---- */
.aidi-type-card[data-card="websiteFiles"] .aidi-type-icon {
    background: #f3e8ff;
    color: #7c3aed;
}
.aidi-type-card[data-card="websiteFiles"] .aidi-type-count strong {
    color: #7c3aed;
}
.aidi-type-card[data-card="websiteFiles"]:hover,
.aidi-type-card[data-card="websiteFiles"].aidi-type-active {
    border-color: #7c3aed;
    background: #faf5ff;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.12);
}
.aidi-type-card[data-card="websiteFiles"].aidi-type-active .aidi-type-icon {
    background: #7c3aed;
    color: #fff;
}

.aidi-type-card[data-card="websiteFiles"]:hover .aidi-type-icon,
.aidi-type-card[data-card="websiteFiles"].aidi-type-active .aidi-type-icon {
    background: #7c3aed;
    color: #fff;
}


/* ---- Linked Third-Party Blogs & Pages (AMBER/YELLOW) ---- */
.aidi-type-card[data-card="thirdPartyLinks"] .aidi-type-icon {
    background: #fef3c7;
    color: #d97706;
}
.aidi-type-card[data-card="thirdPartyLinks"] .aidi-type-count strong {
    color: #d97706;
}
.aidi-type-card[data-card="thirdPartyLinks"]:hover,
.aidi-type-card[data-card="thirdPartyLinks"].aidi-type-active {
    border-color: #d97706;
    background: #fffbeb;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.12);
}
.aidi-type-card[data-card="thirdPartyLinks"].aidi-type-active .aidi-type-icon {
    background: #d97706;
    color: #fff;
}

.aidi-type-card[data-card="thirdPartyLinks"]:hover .aidi-type-icon,
.aidi-type-card[data-card="thirdPartyLinks"].aidi-type-active .aidi-type-icon {
    background: #d97706;
    color: #fff;
}



/* ---- Videos Found on Partner Website (RED/PINK) ---- */
.aidi-type-card[data-card="recordings"] .aidi-type-icon {
    background: #fee2e2;
    color: #dc2626;
}
.aidi-type-card[data-card="recordings"] .aidi-type-count strong {
    color: #dc2626;
}
.aidi-type-card[data-card="recordings"]:hover,
.aidi-type-card[data-card="recordings"].aidi-type-active {
    border-color: #dc2626;
    background: #fef2f2;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.12);
}
.aidi-type-card[data-card="recordings"].aidi-type-active .aidi-type-icon {
    background: #dc2626;
    color: #fff;
}

.aidi-type-card[data-card="recordings"]:hover .aidi-type-icon,
.aidi-type-card[data-card="recordings"].aidi-type-active .aidi-type-icon {
    background: #dc2626;
    color: #fff;
}
/* ---- Question Response (GREEN) ---- */
.aidi-type-card[data-card="questionResponse"] .aidi-type-icon {
    background: #dcfce7;
    color: #16a34a;
}
.aidi-type-card[data-card="questionResponse"] .aidi-type-count strong {
    color: #16a34a;
}
.aidi-type-card[data-card="questionResponse"]:hover,
.aidi-type-card[data-card="questionResponse"].aidi-type-active {
    border-color: #16a34a;
    background: #f0fdf4;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.12);
}
.aidi-type-card[data-card="questionResponse"].aidi-type-active .aidi-type-icon {
    background: #16a34a;
    color: #fff;
}
.aidi-type-card[data-card="questionResponse"]:hover .aidi-type-icon,
.aidi-type-card[data-card="questionResponse"].aidi-type-active .aidi-type-icon {
    background: #16a34a;
    color: #fff;
}

/* ---- Account Profile (CYAN/TEAL) ---- */
.aidi-type-card[data-card="accountProfile"] .aidi-type-icon {
    background: #cffafe;
    color: #0891b2;
}
.aidi-type-card[data-card="accountProfile"] .aidi-type-count strong {
    color: #0891b2;
}
.aidi-type-card[data-card="accountProfile"]:hover,
.aidi-type-card[data-card="accountProfile"].aidi-type-active {
    border-color: #0891b2;
    background: #ecfeff;
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.12);
}
.aidi-type-card[data-card="accountProfile"].aidi-type-active .aidi-type-icon {
    background: #0891b2;
    color: #fff;
}

.aidi-type-card[data-card="accountProfile"]:hover .aidi-type-icon,
.aidi-type-card[data-card="accountProfile"].aidi-type-active .aidi-type-icon {
    background: #0891b2;
    color: #fff;
}

/* Lift hovered/active card slightly so the shadow reads as elevation */
.aidi-type-card:hover,
.aidi-type-card.aidi-type-active {
    transform: translateY(-1px);
}

/* Match the active border weight to selected state so hover ≈ selected feel */
.aidi-type-card:hover {
    border-width: 2px;
}
.aidi-type-card.aidi-type-active {
    border-width: 2px;
}

/* Restore the colored count number for "of N" suffix text */
.aidi-type-card .aidi-type-count {
    color: #6b7280;
}



/* --- 1. Right-cluster layout --------------------------------------- */
.navbar-header.custom_header_clr > .d-flex:not(.logo_sec_img) {
    flex: 0 0 auto;
    align-items: center !important;
    justify-content: flex-end;
    gap: 6px;
    white-space: nowrap;
    margin-top: 0 !important;
}

.navbar-header.custom_header_clr > .d-flex:not(.logo_sec_img) > * {
    margin-top: 0 !important;
}
.navbar-header.custom_header_clr .exportApp {
    margin-top: 0 !important;
    margin-right: 0 !important;
}

/* --- 2. AI Status badge wrapper ------------------------------------ */
.aii-status-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.navbar-header.custom_header_clr div#globalSettingBtn {
    margin: 0;
}

/* --- 3. AI Status badge itself, sized to match the Export button --- */
.ai-inventory-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 24px;
    padding: 0 10px;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    line-height: 1;
    white-space: nowrap;
}

.ai-inventory-btn:hover {
    border-color: #d9d9d9;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.ai-status-left {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ai-status-right {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #f5a623;
    font-size: 11px;
    font-weight: 600;
}

.aiInvenBtnImg {
    width: 14px;
    height: 14px;
    object-fit: contain;
    display: block;
}

.ai-text {
    color: #1f2937;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.export_ppd {
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
}



/* ---- Top heading ---- */
.aidi-inventory-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 14px;
}

.aidi-inventory-heading-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #eef4ff;
    color: #2a6ebb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.aidi-inventory-heading-title {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #111827 !important;
    line-height: 1.2 !important;
    padding: 0 !important;
    text-align: left !important;
}

.aidi-inventory-heading-sub {
    margin: 3px 0 0 0;
    font-size: 12.5px;
    color: #6b7280;
}

/* ---- Trusted Sources wrapper — single bordered card grouping both
   "Partner Website Sources" and "User Provided Sources" under the
   "Inventory of Trusted Data Sources" heading. Mirrors the popup UX.
   Bottom is flat so the detail panel below visually attaches to it. */
.aidi-trusted-sources {
    border: 1px solid #e5e7eb;
    border-radius: 10px 10px 0 0;
    border-bottom: none;
    background: #fff;
    margin: 10px 10px 0 10px;
    padding: 8px 10px;
}

/* Each subsection is just a label + tile grid — no more per-section
   border / background / gradient. They sit inside .aidi-trusted-sources. */
.aidi-source-section {
    border: none;
    border-radius: 0;
    padding: 8px 4px 4px 4px;
    margin-bottom: 0;
    background: transparent;
}

.aidi-partner-section,
.aidi-user-section {
    padding: 8px 4px 4px 4px;
    margin: 0;
    background: transparent;
}

/* Thin divider between the two subsections inside the wrapper. */
.aidi-trusted-sources .aidi-source-section + .aidi-source-section {
    border-top: 1px solid #f1f5f9;
    margin-top: 6px;
    padding-top: 12px;
}

.aidi-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.aidi-section-title {
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 700;
    color: #16a34a;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.aidi-section-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #16a34a;
    display: inline-block;
}

.aidi-section-meta {
    font-size: 12px;
    color: #2a6ebb;
}

.aidi-section-info {
    color: #2a6ebb;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    
}
.aidi-section-info:hover {
    color: #1d4ed8;
    transform: scale(1.1);
}

/* ---- Type card overrides for the new design ---- */
.aidi-type-card {
    min-height: 140px;
    padding: 14px 14px 12px 14px;
}

.aidi-type-card-top {
    justify-content: flex-end;
}

.aidi-type-card-top .aidi-type-status {
    display: none;
}

.aidi-type-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 4px;
}

.aidi-type-count {
    font-size: 13px;
    color: #6b7280;
    margin-top: auto;
}

.aidi-type-count strong {
    font-size: 24px;
    line-height: 1;
    margin-right: 4px;
}

.aidi-type-count em {
    font-style: normal;
    color: #9ca3af;
    margin-right: 4px;
}

.aidi-type-extra {
    margin: 4px 0 0 0;
    font-size: 11.5px;
    color: #9ca3af;
}

/* User-provided card — neutral gray */
.aidi-type-card[data-card="userProvided"] .aidi-type-icon {
    background: #f3f4f6;
    color: #4b5563;
}
.aidi-type-card[data-card="userProvided"] .aidi-type-count strong {
    color: #111827;
}
.aidi-type-card[data-card="userProvided"]:hover,
.aidi-type-card[data-card="userProvided"].aidi-type-active {
    border-color: #6b7280;
    background: #f9fafb;
    box-shadow: 0 4px 12px rgba(75, 85, 99, 0.10);
}
.aidi-type-card[data-card="userProvided"].aidi-type-active .aidi-type-icon {
    background: #4b5563;
    color: #fff;
}

.aidi-type-card[data-card="userProvided"]:hover .aidi-type-icon,
.aidi-type-card[data-card="userProvided"].aidi-type-active .aidi-type-icon {
    background: #4b5563;
    color: #fff;
}


.aidi-detail-section-header {
    /* Sticky surface */
    position: sticky;
    top: 0;
    z-index: 12;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 24px 18px 28px;

    /* Layered surface */
    background:
        radial-gradient(1200px 200px at 0% 0%, rgba(99, 102, 241, 0.06) 0%, rgba(99, 102, 241, 0) 70%),
        linear-gradient(180deg, #fbfcff 0%, #ffffff 100%);
    border-bottom: 1px solid #eef2f7;
    box-shadow: 0 6px 20px -14px rgba(15, 23, 42, 0.18);

    /* Hides the absolute pseudo-elements (left accent + sheen) cleanly */
    overflow: hidden;

    /* Wrap as a SINGLE block (heading on top, controls below) rather than
       letting controls drift mid-row when space is tight. */
    flex-wrap: wrap;
}

/* Coloured left accent — animated reveal on first paint */
.aidi-detail-section-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 0 4px 4px 0;
}

/* Subtle diagonal sheen running through the strip */
.aidi-detail-section-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 30%, rgba(99, 102, 241, 0.04) 50%, transparent 70%);
    pointer-events: none;
}

/* Per-card accent colours (read from .aidi-detail-body[data-card]) */
.aidi-detail-body[data-card="partnerWebsite"] .aidi-detail-section-header::before { background: linear-gradient(180deg, #2563eb 0%, #3b82f6 100%); }
.aidi-detail-body[data-card="websiteFiles"]   .aidi-detail-section-header::before { background: linear-gradient(180deg, #7c3aed 0%, #a855f7 100%); }
.aidi-detail-body[data-card="thirdPartyLinks"].aidi-detail-section-header::before,
.aidi-detail-body[data-card="thirdPartyLinks"] .aidi-detail-section-header::before { background: linear-gradient(180deg, #d97706 0%, #f59e0b 100%); }
.aidi-detail-body[data-card="recordings"]     .aidi-detail-section-header::before { background: linear-gradient(180deg, #dc2626 0%, #ef4444 100%); }
.aidi-detail-body[data-card="questionResponse"] .aidi-detail-section-header::before { background: linear-gradient(180deg, #10b981 0%, #34d399 100%); }
.aidi-detail-body[data-card="userProvided"]   .aidi-detail-section-header::before { background: linear-gradient(180deg, #64748b 0%, #94a3b8 100%); }

.aidi-detail-section-heading {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 280px;
    min-width: 0;
}
.aidi-detail-section-heading h3 {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    line-height: 1.2 !important;
    text-align: left !important;
    letter-spacing: -0.02em !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.aidi-detail-section-heading p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.45;
}

.aidi-detail-section-right {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    margin-left: auto;
}

/* ---- Included pill — emerald gradient chip with check ---- */
.aidi-detail-section-right .aidi-detail-included {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #d1fae5 0%, #ecfdf5 100%);
    border: 1px solid #6ee7b7;
    border-radius: 999px;
    color: #047857;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 2px 10px -4px rgba(16, 185, 129, 0.30);
}
.aidi-detail-section-right .aidi-detail-included::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 11px;
    color: #10b981;
    background: #fff;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.30);
}
.aidi-detail-section-right .aidi-detail-included strong {
    color: #065f46;
    font-weight: 800;
    font-size: 14px;
}

/* ---- Search input — modern, lifted ---- */
.aidi-detail-section-right .aidi-detail-search {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 9px 14px;
    min-width: 260px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.aidi-detail-section-right .aidi-detail-search:hover {
    border-color: #cbd5e1;
}
.aidi-detail-section-right .aidi-detail-search:focus-within {
    border-color: #6366f1;
    box-shadow:
        0 0 0 4px rgba(99, 102, 241, 0.12),
        0 4px 12px -4px rgba(99, 102, 241, 0.20);
    transform: translateY(-1px);
}
.aidi-detail-section-right .aidi-detail-search i {
    color: #94a3b8;
    font-size: 13px;
    transition: color 0.2s ease;
}
.aidi-detail-section-right .aidi-detail-search:focus-within i { color: #6366f1; }
.aidi-detail-section-right .aidi-detail-search input,
.aidi-detail-section-right .aidi-search-input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 13.5px;
    color: #0f172a;
    width: 100%;
    min-width: 160px;
    padding: 2px 0;
}
.aidi-detail-section-right .aidi-detail-search input::placeholder,
.aidi-detail-section-right .aidi-search-input::placeholder {
    color: #94a3b8;
}

/* ---- Close button — refined, rotates on hover ---- */
.aidi-detail-section-right .aidi-detail-close {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #64748b;
    font-size: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.25s ease, box-shadow 0.2s ease;
}
.aidi-detail-section-right .aidi-detail-close:hover {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #fca5a5;
    color: #dc2626;
    transform: rotate(90deg) scale(1.06);
    box-shadow: 0 6px 16px -4px rgba(220, 38, 38, 0.25);
}
.aidi-detail-section-right .aidi-detail-close:active {
    transform: rotate(90deg) scale(0.94);
}

.qr-section-heading {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    line-height: 1.2 !important;
    text-align: left !important;
    letter-spacing: -0.02em !important;
}
.qr-section-heading-sub {
    font-weight: 500;
    font-size: 13px;
    color: #64748b;
    margin-left: 8px;
    letter-spacing: 0;
}


.aidi-detail-section-heading .qr-top-tabs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0 0 6px 0;
    padding: 4px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}
.aidi-detail-section-heading .qr-top-tab {
    background: transparent;
    border: none;
    color: #64748b;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.aidi-detail-section-heading .qr-top-tab:hover {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.7);
}
.aidi-detail-section-heading .qr-top-tab.active {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #8b5cf6 100%);
    color: #ffffff;
    box-shadow:
        0 6px 16px -4px rgba(99, 102, 241, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.20);
}
.aidi-detail-section-heading .qr-top-tab.active:hover {
    background: linear-gradient(135deg, #4338ca 0%, #6366f1 50%, #7c3aed 100%);
    color: #ffffff;
}
/* Suppress the legacy bg_theme_color2 utility on tabs */
.aidi-detail-section-heading .qr-top-tab.bg_theme_color2 {
    background: transparent;
    color: #64748b;
}
.aidi-detail-section-heading .qr-top-tab.bg_theme_color2.active {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #8b5cf6 100%);
    color: #fff;
}

@media (max-width: 900px) {
    .aidi-detail-section-right {
        flex: 1 0 100%;
        margin-left: 0;
        margin-top: 4px;
        justify-content: flex-start;
    }
    .aidi-detail-section-right .aidi-detail-search {
        flex: 1 1 220px;
        min-width: 0;
    }
}
@media (max-width: 720px) {
    .aidi-detail-section-header {
        padding: 16px 18px 16px 22px;
        gap: 12px;
    }
    .aidi-detail-section-right {
        flex-wrap: wrap;
    }
    .aidi-detail-section-heading h3 { font-size: 17px !important; }
    .aidi-detail-section-heading .qr-top-tabs { width: 100%; }
}

.aidi-list-item--editable {
    align-items: flex-start;
    padding: 14px 16px;
}
.aidi-list-item--editable .aidi-list-check {
    margin-top: 6px;
}

.aidi-url-edit-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.aidi-url-edit-input {
    flex: 1;
    min-width: 0;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #0f172a;
    outline: none;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.aidi-url-edit-input:hover {
    border-color: #cbd5e1;
}
.aidi-url-edit-input:focus {
    background: #ffffff;
    border-color: #6366f1;
    box-shadow:
        0 0 0 4px rgba(99, 102, 241, 0.12),
        0 4px 12px -4px rgba(99, 102, 241, 0.18);
}
.aidi-url-edit-input::placeholder {
    color: #94a3b8;
}

/* Read-only partner URL — the input still posts its value with the
   form, but the user cannot edit it; visual style communicates that. */
.aidi-url-readonly,
.aidi-url-readonly:hover,
.aidi-url-readonly:focus {
    background: #f3f4f6;
    color: #4b5563;
    border-color: #e5e7eb;
    cursor: default;
    user-select: text;
    box-shadow: none;
    outline: none;
}

/* "Open in new tab" affordance next to the input */
.aidi-url-open-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #eff6ff;
    border: 1.5px solid #dbeafe;
    color: #2563eb;
    text-decoration: none !important;
    flex-shrink: 0;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.aidi-url-open-btn:hover {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #93c5fd;
    color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px -2px rgba(37, 99, 235, 0.20);
}
.aidi-url-open-btn:active {
    transform: translateY(0);
}
.aidi-url-open-btn i { font-size: 13px; }

/* Validation warning beneath the input */
.aidi-list-item--editable .partnerUrlWarning {
    display: none;
    margin-top: 6px;
    font-size: 12px;
    color: #dc2626;
}
.aidi-list-item--editable .partnerUrlWarning.show {
    display: block;
}

/* Include toggle */
.aidi-list-item--editable .partnerUrlInclude {
    width: 16px;
    height: 16px;
    accent-color: #16a34a;
    cursor: pointer;
}

/* Info icon that replaces the partner-URL include checkbox.
   Communicates that the URL is locked and managed in Account settings. */
.aidi-partner-url-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-top: 6px;
    color: #2563eb;
    font-size: 16px;
    cursor: help;
    flex-shrink: 0;
    transition: color 0.2s ease, transform 0.2s ease;
}
.aidi-partner-url-info:hover {
    color: #1d4ed8;
    transform: scale(1.1);
}


.aidi-external-sources-list {
    max-height: 45vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    /* margin-top: 8px; */
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.aidi-external-sources-list::-webkit-scrollbar { width: 6px; }
.aidi-external-sources-list::-webkit-scrollbar-track { background: transparent; }
.aidi-external-sources-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.aidi-external-sources-list::-webkit-scrollbar-thumb:hover { background: #94a3b8; }


#userProvidedDetails .aidi-detail-section-header {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.up-subsection {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0;
    margin: 10px 16px 14px 16px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.up-subsection + .up-subsection { margin-top: 0; }

.up-sub-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.up-sub-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #0f172a;
    font-size: 14px;
}
.up-sub-title > i {
    width: 22px; height: 22px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 6px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 14px;
}
.up-sub-label { font-weight: 700; color: #0f172a; }
.up-sub-count {
    margin-left: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
}
.up-sub-count strong { color: #0f172a; font-weight: 700; }

/* Upload files button — file input hidden, label styled as button. */
.up-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: #1e3a8a;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
    margin: 0;
}
.up-upload-btn:hover {
    background: #eef4ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}
.up-upload-btn i { font-size: 12px; }
.up-upload-input {
    position: absolute;
    width: 0; height: 0;
    opacity: 0;
    pointer-events: none;
}

/* External URL add row — input + "+" button */
.up-url-add {
    display: flex;
    align-items: center;
    flex-wrap: wrap;  /* lets .up-url-warning wrap onto its own line */
    gap: 8px;
    padding: 12px 16px 4px 16px;
}

.up-url-add .up-url-warning {
    flex-basis: 100%;
    margin: 2px 0 0 0;
    font-size: 12.5px;
    line-height: 1.3;
    min-height: 0;
}
.up-url-add .up-url-warning.show {
    min-height: 18px;
}
.up-url-input-shell {
    flex: 1;
    display: inline-flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0 10px;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.up-url-input-shell:focus-within {
    background: #ffffff;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}
.up-url-prefix {
    color: #94a3b8;
    font-size: 13px;
    margin-right: 6px;
}
.up-url-input {
    flex: 1;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 8px 4px !important;
    font-size: 13px !important;
    color: #1e3a8a;
    min-width: 0;
}
.up-url-input::placeholder { color: #94a3b8; }
.up-url-add-btn {
    width: 36px; height: 36px;
    border: 1px solid #cbd5e1;
    background: #0D527C;
    color: #ffffff;
    border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: background .15s ease, transform .1s ease;
    flex-shrink: 0;
}


/* List of rows inside a subsection */
.up-sub-list {
    padding: 6px 8px 12px 8px;
}

.up-empty {
    margin: 0;
    padding: 14px 14px;
    font-size: 12.5px;
    font-style: italic;
    color: #94a3b8;
}

.up-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    transition: background .15s ease;
}
.up-row:hover { background: #f8fafc; }

.up-row-check {
    display: inline-flex; align-items: center;
    margin: 0;
}
.up-row-check input[type="checkbox"] {
    width: 16px; height: 16px;
    accent-color: #4f46e5;
    cursor: pointer;
}

.up-row-icon {
    width: 30px; height: 30px;
    border-radius: 7px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}
.up-row-icon--file { background: #eef2ff; color: #4f46e5; }
.up-row-icon--url  { background: #ecfdf5; color: #047857; }

.up-row-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.up-row-title {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    text-decoration: none !important;
    line-height: 1.3;
    word-break: break-all;
}
.up-row-title:hover { color: #1d4ed8; }
.up-row-extlink {
    font-size: 9px;
    color: #94a3b8;
    margin-left: 4px;
}
.up-row-sub {
    font-size: 11.5px;
    color: #64748b;
    line-height: 1.2;
}

.up-row-remove {
    width: 28px; height: 28px;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 6px;
    color: #94a3b8;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}
.up-row-remove:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}
.up-row-remove:active { transform: scale(0.92); }
.up-row-remove i { font-size: 13px; pointer-events: none; }


.aidi-detail-subheader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 16px;
    background: #f9fafb;
    border-bottom: 1px solid #f3f4f6;
    font-size: 12px;
    color: #6b7280;
    position: sticky;
    top: 50px;
    z-index: 9;
}

.aidi-detail-subtitle {
    color: #4b5563;
}

.aidi-detail-included {
    color: #16a34a;
    font-weight: 500;
}

.aidi-detail-included strong {
    color: #16a34a;
    font-weight: 700;
}

/* ---- Detail panel list rows (new design) ---- */

.aidi-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.aidi-list-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 4px;
    border-bottom: 1px solid #f3f4f6;
}

.aidi-list-item:last-child {
    border-bottom: none;
}

.aidi-list-check {
    display: inline-flex;
    align-items: center;
    margin: 2px 0 0 0;
}

.aidi-list-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #1e3a8a;
    cursor: pointer;
}

.aidi-list-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.aidi-list-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    text-decoration: none !important;
    /* display: inline-flex; */
    /* align-items: center;
    gap: 6px; */
    line-height: 1.3;
}

.aidi-list-title:hover {
    color: #1d4ed8;
}

.aidi-list-title i {
    font-size: 10px;
    color: #2a6ebb;
}


.aidi-list-url {
    font-size: 12px;
    color: #2a6ebb;
    word-break: normal;
    overflow-wrap: anywhere; /* optional safe wrap */
}
.aidi-list-tag {
    font-size: 10.5px;
    font-weight: 600;
    color: #6b7280;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.aidi-list-delete {
    flex-shrink: 0;
    margin-left: 6px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #dc2626;
    cursor: pointer;
    transition:
        background .15s ease,
        color .15s ease,
        border-color .15s ease,
        transform .1s ease;
    padding: 0;
}

.aidi-list-delete:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
    transform: scale(1.08);
}

.aidi-list-delete:active {
    transform: scale(0.94);
}

.aidi-list-delete:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.aidi-list-delete i {
    font-size: 16px;
    line-height: 1;
    pointer-events: none;
}

.aidi-list-item {
    align-items: center;
}

/* Inline check icon next to "AI-integrated" percent */
.aidi-quantity-percent i {
    margin-right: 4px;
    color: #16a34a;
}
/*step1 ai icon */
.step1-ai-icon{
    width: 45px;
    height: 38px;
    margin-right: 3px;
}

/* Inline section list rendered inside the Question Response detail body */
.qr-inline-list { display: flex; flex-direction: column; gap: 6px; }
.qr-inline-row {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
    transition: border-color .15s ease, background .15s ease;
}
.qr-inline-row:hover { border-color: #cbd5e1; background: #f9fafb; }
.qr-inline-check {
    display: flex; align-items: center; gap: 10px;
    flex: 1; min-width: 0; cursor: pointer; margin: 0;
}
.qr-inline-check input[type="checkbox"] {
    width: 16px; height: 16px; accent-color: #16a34a; cursor: pointer; flex-shrink: 0;
}
.qr-inline-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.qr-inline-title { font-size: 13.5px; font-weight: 2; color: #111827; }
.qr-inline-meta  { font-size: 12px; color: #6b7280; }
.qr-inline-open {
    display: inline-flex; align-items: center; gap: 6px;
    color: #2a6ebb; font-size: 12.5px; text-decoration: none !important;
    padding: 4px 8px; border-radius: 6px;
    flex-shrink: 0;
}
.qr-inline-open:hover { background: #eef4ff; color: #1d4ed8; }
.qr-inline-open i { font-size: 10px; }


.inventory-link-wrapper {
    text-align: center;
}

.invent-page-link {
    text-decoration: underline !important;
    display: inline-block;
}

/* Compact icon-only link to the full inventory page — replaces the
   long "Open full Inventory page →" text link inside the popup. */
.invent-page-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    color: #2a6ebb;
    background: #eef4ff;
    border: 1px solid #dbeafe;
    text-decoration: none !important;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.invent-page-icon:hover {
    background: #2a6ebb;
    color: #fff;
    transform: translateY(-1px);
}
.invent-page-icon i { font-size: 13px; }

/* When the inventory icon lives inside the popup header, push it to
   the far right so it pairs visually with the "Inventory of Trusted
   Data Sources" title and stays out of the way of the title block. */
.aii-mini-header-action {
    margin-left: auto;
    align-self: center;
    flex-shrink: 0;
}


.qr-top-tabs {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 10px;
}
.qr-top-tab {
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}


.qr-single-mode .qr-top-tabs { display: inline-flex; }
.qr-single-mode .qr-top-tab  { flex: 0 0 auto; }


.aidi-type-card.aidi-type-card-disabled {
    cursor: default;
    background: #f9fafb;
    border-color: #e5e7eb;
    box-shadow: none;
}
.aidi-type-card.aidi-type-card-disabled:hover { transform: none; box-shadow: none; }
.aidi-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    padding: 0px 4px;
}
.aidi-empty-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: #eef2ff;
    color: #4f46e5;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    border: 1px solid #e0e7ff;
}
.aidi-empty-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
}
.aidi-empty-desc {
    margin: 0;
    font-size: 12.5px;
    color: #6b7280;
    line-height: 1.45;
    max-width: 280px;
}
.aidi-empty-desc strong { color: #4338ca; font-weight: 700; }

/* Left-aligned variant of the empty state — used when the Account
   Profile module is inactive for the partner. Polished card look:
   gradient background, accent border, icon on the left, body on the right. */
.aidi-empty-state.aidi-empty-state--left {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    gap: 14px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
    border: 1px solid #c7d2fe;
    border-radius: 12px;
    box-shadow: 0 2px 8px -2px rgba(79, 70, 229, 0.10);
    width: 100%;
}
.aidi-empty-state--left .aidi-empty-icon {
    width: 44px;
    height: 44px;
    font-size: 20px;
    /* background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%); */
    background-color: gray;
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 10px -2px rgba(99, 102, 241, 0.35);
}
.aidi-empty-state--left .aidi-empty-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.aidi-empty-state--left .aidi-empty-title {
    font-size: 14px;
    font-weight: 700;
    color: #312e81;
}
.aidi-empty-state--left .aidi-empty-desc {
    max-width: none;
    font-size: 12.5px;
    color: #4b5563;
}

.qr-header-tabs {
    margin: 0;
    padding: 0;
    border-bottom: none;
    flex-shrink: 0;
}

.aidi-detail-title:empty,
.aidi-detail-title > .aidi-detail-active-name:empty {
    display: none;
}

.qr-tab-panel { display: none; }
.qr-tab-panel.active { display: block; }

.qr-inline-list {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.qr-inline-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: none;
    border-bottom: 1px solid #f3f4f6;
    border-radius: 0;
    background: #fff;
    transition: background .15s ease;
}
.qr-inline-row:last-child { border-bottom: none; }
.qr-inline-row:hover { background: #f9fafb; }

/* Checkbox column */
.qr-inline-check {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    cursor: pointer;
    margin: 0;
}
.qr-inline-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #16a34a;
    cursor: pointer;
    flex-shrink: 0;
}

/* Title + meta cluster */
.qr-inline-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
    cursor: pointer;
}
.qr-inline-title {
    font-size: 14px;
    font-weight: 2;
    color: #111827;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.25;
}
.qr-inline-meta {
    font-size: 12.5px;
    color: #6b7280;
}

/* External-link icon to the right of the title (Account Profile rows) */
.qr-inline-title i.fa-arrow-up-right-from-square,
.qr-profile-link i.fa-arrow-up-right-from-square {
    font-size: 11px;
    color: #2563eb;
    margin-left: 2px;
}

/* --- Account Profile rows --- */
.qr-profile-link {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    color: #1f2937;
    text-decoration: none !important;
}
.qr-profile-link:hover { color: #2563eb; }
.qr-profile-link .qr-inline-title { color: #111827; }
.qr-profile-link:hover .qr-inline-title { color: #2563eb; }
.qr-profile-link .qr-inline-meta {
    font-size: 13px;
    color: #6b7280;
    font-style: normal;
}

.aidi-detail-body {
    display: none;
}

.aidi-detail-body.aidi-detail-active {
    display: block;
}

.aidi-detail-section-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.aidi-detail-section-heading h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.aidi-detail-section-heading p {
    margin: 4px 0 0;
    color: #6b7280;
    font-size: 13px;
}

.aidi-detail-section-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qr-section-heading {
    margin: 14px 0 0;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.qr-section-heading-sub {
    font-weight: 500;
    color: #6b7280;
    font-size: 14px;
}

.ai-status-tier { transition: border-color .2s ease, color .2s ease; }

/* Non-header contexts (e.g. inventory page) — lower specificity is fine. */
.ai-status-tier-red    { border-color: #fecaca !important; }
.ai-status-tier-red    .ai-status-right,
.ai-status-tier-red    .ai-status-right i,
.ai-status-tier-red    .ai-status-pct   { color: #dc2626 !important; }

.ai-status-tier-orange { border-color: #fed7aa !important; }
.ai-status-tier-orange .ai-status-right,
.ai-status-tier-orange .ai-status-right i,
.ai-status-tier-orange .ai-status-pct   { color: #f5a623 !important; }

.ai-status-tier-green  { border-color: #a7f3d0 !important; }
.ai-status-tier-green  .ai-status-right,
.ai-status-tier-green  .ai-status-right i,
.ai-status-tier-green  .ai-status-pct   { color: #16a34a !important; }


header#page-topbar .navbar-header.custom_header_clr .ai-inventory-btn.ai-status-tier-red    { border-color: #fecaca !important; }
header#page-topbar .navbar-header.custom_header_clr .ai-inventory-btn.ai-status-tier-red    .ai-status-right,
header#page-topbar .navbar-header.custom_header_clr .ai-inventory-btn.ai-status-tier-red    .ai-status-right i,
header#page-topbar .navbar-header.custom_header_clr .ai-inventory-btn.ai-status-tier-red    .ai-status-pct   { color: #dc2626 !important; }

header#page-topbar .navbar-header.custom_header_clr .ai-inventory-btn.ai-status-tier-orange { border-color: #fed7aa !important; }
header#page-topbar .navbar-header.custom_header_clr .ai-inventory-btn.ai-status-tier-orange .ai-status-right,
header#page-topbar .navbar-header.custom_header_clr .ai-inventory-btn.ai-status-tier-orange .ai-status-right i,
header#page-topbar .navbar-header.custom_header_clr .ai-inventory-btn.ai-status-tier-orange .ai-status-pct   { color: #f5a623 !important; }

header#page-topbar .navbar-header.custom_header_clr .ai-inventory-btn.ai-status-tier-green  { border-color: #a7f3d0 !important; }
header#page-topbar .navbar-header.custom_header_clr .ai-inventory-btn.ai-status-tier-green  .ai-status-right,
header#page-topbar .navbar-header.custom_header_clr .ai-inventory-btn.ai-status-tier-green  .ai-status-right i,
header#page-topbar .navbar-header.custom_header_clr .ai-inventory-btn.ai-status-tier-green  .ai-status-pct   { color: #16a34a !important; }


.inventory-page-wrap #globalAiSettingForm {
    display: block !important;
}
.inventory-page-topbar {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.inventory-page-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #2a6ebb;
    font-size: 13px;
    text-decoration: none;
    margin-bottom: 8px;
}

.inventory-page-back:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.inventory-page-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.inventory-page-title-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #eef4ff;
    color: #2a6ebb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.inventory-page-title h3 {
    margin: 0 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    padding: 0 !important;
    line-height: 1.3em !important;
}

.inventory-page-title p {
    margin: 2px 0 0 0;
    color: #6b7280;
    font-size: 13px;
    font-style: italic;
}

.inventory-page-savebar {
    display: flex;
    justify-content: flex-end;
    padding: 14px 0 8px 0;
}

.inventory-page-savebar .aii-save-plan-btn {
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}


.s1-inline-wrap {
    /* Step 1 view — left-aligned, fills container width (no longer
       centered with empty space on either side). The interactive
       elements below are capped individually so the form still
       reads at a comfortable width. */
    margin: 24px 0;
    padding: 0;
    max-width: none;
    font-family: 'IBM Plex Sans', sans-serif;
}
.s1-inline-wrap .s1-inline-content { width: 100%; }
.s1-inline-wrap .s1-card { width: 100%; }

/* Cap the URL input row + info box so they don't span the full
   viewport. Title / subtitle / eyebrow keep their natural widths. */
.s1-inline-wrap .s1-input-row,
.s1-inline-wrap .s1-info {
    max-width: 720px;
}

.s1-inline-wrap,
.s1-inline-wrap * {
    font-family: 'IBM Plex Sans', sans-serif !important;
}
/* Keep Font Awesome icons rendering correctly even with the override. */
.s1-inline-wrap i.fa-solid,
.s1-inline-wrap i.fa-regular,
.s1-inline-wrap i.fa-brands,
.s1-inline-wrap i.fa-light,
.s1-inline-wrap i.fa-duotone {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "Font Awesome 6 Pro" !important;
}

.s1-inline-content {
    width: 100%;
}

.s1-card {
    background: #ffffff;
    /* border: 1px solid #e5e7eb; */
    /* border-radius: 16px; */
    /* padding: 32px 32px 28px; */
    /* box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04); */
}

/* Eyebrow — pill-style chip */
.s1-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #1e3a8a;
    background: #eef2ff;
    border: 1px solid #e0e7ff;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.s1-eyebrow-icon { font-size: 12px; color: #1e3a8a; }

/* Title + subtitle */
.s1-title {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
    letter-spacing: -0.01em;
}
.s1-subtitle {
    margin: 0 0 22px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #475569;
    max-width: 640px;
}

/* Field */
.s1-field { margin-bottom: 18px; }
.s1-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}
.s1-label i { font-size: 12px; color: #475569; }

.s1-input-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.s1-input {
    flex: 1;
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    padding: 11px 16px !important;
    font-size: 14px !important;
    color: #0f172a !important;
    outline: none !important;
    box-shadow: none !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    min-width: 0;
    height: auto !important;
}
.s1-input::placeholder { color: #94a3b8; }
.s1-input:focus {
    background: #ffffff !important;
    border-color: #1e3a8a !important;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12) !important;
}

.s1-save-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    background: #1e3a8a;
    color: #ffffff !important;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
    box-shadow: 0 1px 2px rgba(30, 58, 138, 0.25);
}
.s1-save-btn:hover  { background: #1e40af; box-shadow: 0 2px 6px rgba(30, 58, 138, 0.32); }
.s1-save-btn:active { transform: scale(0.98); }
.s1-save-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.s1-save-btn i { font-size: 11px; }

/* Inline warning — matches existing .partnerUrlWarning */
.s1-field .partnerUrlWarning {
    margin-top: 8px;
    font-size: 12.5px;
    color: #dc2626;
    min-height: 18px;
    display: none;
}
.s1-field .partnerUrlWarning.show { display: block; }

/* Read-only / admin-only note shown beneath the URL field.
   Styled as a soft amber advisory banner so the user immediately
   sees that the URL becomes locked after save, without it looking
   like an error. Width matches the URL input row above. */
.s1-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 12px 0 0 0;
    padding: 11px 14px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fcd34d;
    border-left: 4px solid #d97706;
    border-radius: 8px;
    font-size: 13px;
    color: #78350f;
    line-height: 1.55;
    max-width: 720px;
    box-shadow: 0 1px 2px rgba(217, 119, 6, 0.06);
}
.s1-note i {
    color: #d97706;
    font-size: 14px;
    margin-top: 1px;
    flex-shrink: 0;
}
.s1-note strong {
    color: #92400e;
    font-weight: 700;
}

/* Info box at the bottom */
.s1-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #f3f6fb;
    border: 1px solid #e0e7ff;
    border-radius: 12px;
    padding: 14px 16px;
    margin-top: 4px;
}
.s1-info-icon {
    width: 28px; height: 28px;
    border-radius: 8px;
    background: #ffffff;
    color: #1e3a8a;
    border: 1px solid #e0e7ff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}
.s1-info p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #475569;
}
.s1-info strong { color: #0f172a; font-weight: 700; }

/* Small-screen tweaks */
@media (max-width: 540px) {
    .s1-card { padding: 24px 20px 20px; }
    .s1-input-row { flex-direction: column; align-items: stretch; }
    .s1-save-btn { justify-content: center; padding: 11px 22px; }
}


.qr-modal-dialog { max-width: 720px; }
.qr-modal-content {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 10px 36px rgba(0,0,0,0.12);
    background: #fff;
    overflow: hidden;
    font-family: Arial, "Segoe UI", sans-serif;
    color: #1f2937;
}

/* Header (shared by list & question views) */
.qr-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 18px 22px 8px 22px;
    gap: 16px;
}
.qr-header h4 {
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    line-height: 1.3 !important;
}
.qr-header p { margin: 4px 0 0 0; font-size: 12.5px; color: #6b7280; }
.qr-close {
    background: transparent; border: none; font-size: 20px; color: #6b7280;
    cursor: pointer; padding: 0 4px; line-height: 1;
}
.qr-close:hover { color: #111827; }

/* ========== List view ========== */
.qr-overall { padding: 8px 22px 14px 22px; }
.qr-overall-row {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 12.5px; color: #4b5563; margin-bottom: 6px;
}
.qr-overall-pct { color: #2a6ebb; font-weight: 600; }
.qr-overall-bar { height: 4px; background: #e5e7eb; border-radius: 999px; overflow: hidden; }
.qr-overall-fill { height: 100%; background: linear-gradient(90deg,#1e3a8a,#2a6ebb); border-radius: 999px; transition: width 0.3s ease; }

.qr-section-list { padding: 0 14px 18px 14px; max-height: 60vh; overflow-y: auto; }
.qr-section-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; margin-bottom: 6px;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
    text-decoration: none !important; color: #1f2937;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.qr-section-row:hover {
    background: #f9fafb; border-color: #cbd5e1;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.qr-section-radio {
    width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #cbd5e1;
    flex-shrink: 0; background: #fff;
}
.qr-section-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.qr-section-title { font-size: 14px; font-weight: 600; color: #111827; }
.qr-section-meta  { font-size: 12px; color: #6b7280; }
.qr-section-pct   { font-size: 12.5px; font-weight: 600; color: #6b7280; flex-shrink: 0; }
.qr-section-arrow { color: #9ca3af; font-size: 12px; flex-shrink: 0; }

/* ========== Question view ========== */
.qr-back-link {
    display: inline-flex; align-items: center; gap: 6px;
    margin: 0 22px 8px 22px;
    color: #2a6ebb; font-size: 13px; text-decoration: none !important;
}
.qr-back-link:hover { color: #1d4ed8; text-decoration: underline !important; }
.qr-back-link i { font-size: 11px; }

.qr-questions-list { padding: 4px 22px 16px 22px; max-height: 55vh; overflow-y: auto; }
.qr-question-card {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
    padding: 14px 16px; margin-bottom: 12px;
}
.qr-question-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 6px;
}
.qr-question-label {
    font-size: 10.5px; letter-spacing: 0.8px; font-weight: 700;
    color: #6b7280; text-transform: uppercase;
}
.qr-question-text {
    margin: 0 0 12px 0; font-size: 14.5px; font-weight: 600; color: #111827;
}

/* Include toggle */
.qr-toggle {
    display: inline-flex; align-items: center; gap: 8px;
    margin: 0; cursor: pointer; user-select: none;
}
.qr-toggle input { display: none; }
.qr-toggle-track {
    position: relative; width: 32px; height: 18px; background: #e5e7eb;
    border-radius: 999px; transition: background .15s ease;
}
.qr-toggle-thumb {
    position: absolute; top: 2px; left: 2px;
    width: 14px; height: 14px; background: #fff; border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15); transition: left .15s ease;
}
.qr-toggle input:checked + .qr-toggle-track { background: #1e3a8a; }
.qr-toggle input:checked + .qr-toggle-track .qr-toggle-thumb { left: 16px; }
.qr-toggle-text { font-size: 12.5px; color: #6b7280; }

/* Options & textarea */                                                    
.qr-options { display: flex; flex-direction: column; gap: 6px; }
.qr-option {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 0; margin: 0; cursor: pointer;
    font-size: 14px; color: #1f2937; line-height: 1.3;
}

.qr-option input { width: 16px; height: 16px; accent-color: #1e3a8a; cursor: pointer; }
.qr-text-input {
    width: 100%; min-height: 80px; resize: vertical;
    background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px;
    padding: 10px 12px; font-size: 14px; color: #1f2937; outline: none;
    font-family: inherit;
}
.qr-text-input:focus { background: #fff; border-color: #2a6ebb; }

.qr-empty { text-align: center; color: #9ca3af; font-style: italic; font-size: 13px; padding: 20px 0; }

/* Footer */
.qr-footer { display: flex; justify-content: flex-end; padding: 12px 22px 18px 22px; border-top: 1px solid #f3f4f6; }
.qr-done-btn {
    background: #1e3a8a; color: #fff; border: none;
    padding: 9px 22px; border-radius: 8px; cursor: pointer;
    font-size: 13.5px; font-weight: 600;
    transition: background .15s ease;
}
.qr-done-btn:hover { background: #1e40af; }

.save-settings-btn {
    background-color: #0D527C;
    color: #fff;
    margin-right: 10px;
}

.save-settings-btn:hover {
    background-color: #0D527C;
    color: #fff;
}

/*highlight Search*/
.aidi-search-highlight{
    background:#ffff00;
    color:#000;
    /* padding:0 2px; */
    border-radius:2px;
}

.aidi-no-results{
    text-align:center;
    padding:15px;
    color:#777;
    display:none;
}

button.bg_theme_color1.regen-btn-top {
    border-radius: 5px;
    margin-right: 10px;
}

button.btn.bg_theme_color1.regener-persection-btn {
    border-radius: 5px;
    height: 25px;
    padding: 1px 3px 12px 4px;
}



.aii-mini {
    position: absolute;
    top: 40px !important;
    right: 0;
    z-index: 1050;
    width: 700px;
    max-width: calc(100vw - 24px);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.12);
    padding: 14px 16px 12px 16px;
    font-family: Arial, "Segoe UI", sans-serif;
    color: #1f2937;
}

.aii-mini-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #f3f6fb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
}

.aii-mini-header-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #fff;
    color: #2a6ebb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    border: 1px solid #e5e7eb;
}

.aii-mini-header-text h5 {
    margin: 0 !important;
    font-size: 14px !important;
    color: #111827 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
}

.aii-mini-header-text p {
    margin: 2px 0 0 0;
    font-size: 12px;
    color: #6b7280;
    font-style: normal;
}

/* 3-column tile grid */
.aii-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.aii-mini-tile {
    background: #fff;
    border: 1px solid #e5e7eb;
    max-width: 225px !important;
    border-radius: 10px;
    padding: 10px 10px 9px 10px;
    text-decoration: none !important;
    color: #1f2937;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.aii-mini-tile:hover {
    transform: translateY(-1px);
    border-color: currentColor;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.aii-mini-icon {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    margin-bottom: 2px;
}

.aii-mini-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    line-height: 1.25;
    /* text-wrap: initial !important; */
}

.aii-mini-count {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.aii-mini-count strong {
    font-size: 16px;
    font-weight: 700;
}

.aii-mini-count em {
    font-style: normal;
    color: #9ca3af;
    margin-left: 2px;
}

/* Per-color accents (icon tile + count number) */
.aii-mini-tile[data-color="blue"]   .aii-mini-icon { background: #eef4ff; color: #2a6ebb; }
.aii-mini-tile[data-color="blue"]   .aii-mini-count strong { color: #2a6ebb; }

.aii-mini-tile[data-color="purple"] .aii-mini-icon { background: #f3e8ff; color: #7c3aed; }
.aii-mini-tile[data-color="purple"] .aii-mini-count strong { color: #7c3aed; }

.aii-mini-tile[data-color="amber"]  .aii-mini-icon { background: #fef3c7; color: #d97706; }
.aii-mini-tile[data-color="amber"]  .aii-mini-count strong { color: #d97706; }

.aii-mini-tile[data-color="red"]    .aii-mini-icon { background: #fee2e2; color: #dc2626; }
.aii-mini-tile[data-color="red"]    .aii-mini-count strong { color: #dc2626; }

.aii-mini-tile[data-color="green"]  .aii-mini-icon { background: #dcfce7; color: #16a34a; }
.aii-mini-tile[data-color="green"]  .aii-mini-count strong { color: #16a34a; }

.aii-mini-tile[data-color="cyan"]   .aii-mini-icon { background: #cffafe; color: #0891b2; }
.aii-mini-tile[data-color="cyan"]   .aii-mini-count strong { color: #0891b2; }

/* Disabled / empty-state tile (e.g. QR & Account Profile both inactive) */
.aii-mini-tile-disabled {
    background: #f9fafb;
    border-style: dashed;
    color: #9ca3af !important;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none !important;
    transform: none !important;
}
.aii-mini-tile-disabled .aii-mini-icon {
    background: #f3f4f6 !important;
    color: #9ca3af !important;
}
.aii-mini-tile-disabled .aii-mini-title {
    color: #6b7280;
    font-weight: 600;
}
.aii-mini-empty {
    font-size: 11.5px;
    font-style: normal;
    color: #9ca3af;
}


.aii-mini-trusted {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px 6px 12px;
    background: #fff;
    margin-bottom: 10px;
}
.aii-mini-subsection {
    padding: 4px 0 6px 0;
}
.aii-mini-subhead {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-style: normal !important;
    color: #059669;
    text-transform: uppercase;
    margin: 2px 0 8px 0;
}
.aii-mini-subhead i { font-size: 11px; }
.aii-mini-subdivider {
    height: 1px;
    background: #f1f5f9;
    margin: 2px 0 6px 0;
}
.aii-mini-section-dot {
    width: 8px; height: 8px; border-radius: 999px;
    background: #16a34a;
    display: inline-block;
}


.aii-mini-grid-2 { grid-template-columns: repeat(3, 1fr); }

.aii-mini,
.aii-mini *:not(i):not([class*="fa-"]),
.aii-mini h5,
.aii-mini p,
.aii-mini strong,
.aii-mini em,
.aii-mini b,
.aii-mini span,
.aii-mini a {

    font-family: var(--bs-body-font-family, "IBM Plex Sans", sans-serif);
    font-style: normal !important;

}

/* Restore Font Awesome glyph font on icons inside the popup —
   otherwise the cascading text font above replaces the icon font
   and the glyph slots render empty (the boxes you see in the
   screenshot). */
.aii-mini i.fa,
.aii-mini i[class*="fa-"],
.aii-mini i.fa-solid,
.aii-mini i.fa-regular,
.aii-mini i.fa-brands,
.aii-mini i.fa-light,
.aii-mini i.fa-duotone {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "Font Awesome 6 Pro", "Font Awesome 5 Free", "Font Awesome 5 Brands" !important;
}

.aii-mini i.fas,
.aii-mini i.fa-solid       { font-weight: 900 !important; }
.aii-mini i.far,
.aii-mini i.fa-regular,
.aii-mini i.fab,
.aii-mini i.fa-brands      { font-weight: 400 !important; }

.aii-mini-title          { font-weight: 600 !important; }
.aii-mini-count strong   { font-weight: 600 !important; }
.aii-mini-progress-label { font-weight: 400 !important; }
.aii-mini-progress-count { font-weight: 500 !important; }

/* External Sources row */
.aii-mini-external {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 10px;
    color: #1f2937;
    text-decoration: none !important;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.aii-mini-external:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #1f2937;
}

.aii-mini-ext-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #f3f4f6;
    color: #6b7280;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.aii-mini-ext-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.aii-mini-ext-text strong {
    font-size: 12.5px;
    font-weight: 600;
    color: #111827;
}

.aii-mini-ext-text span {
    font-size: 11.5px;
    color: #6b7280;
}

.aii-mini-ext-count {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-left: auto;
}

/* Progress block */
.aii-mini-progress-block {
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
}

.aii-mini-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.aii-mini-progress-label {
    font-size: 10.5px;
    letter-spacing: 0.6px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
}

.aii-mini-progress-count {
    font-size: 12px;
    font-weight: 600;
    color: #111827;
}

.aii-mini-progress-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.aii-mini-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1e3a8a, #2a6ebb);
    border-radius: 999px;
    transition: width 0.3s ease;
}

@media (max-width: 640px) {
    .aii-mini-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.source-legend {
    display: flex;
    justify-content: flex-end; /* Align to right */
    align-items: center;
    gap: 15px; /* Space between items */
    width: 100%;
}

.source-legend span {
    display: inline-flex;
    align-items: center;
} 