.mindweco-conversations-wrap {
    max-width: 100%;
    padding: 13px 15px 20px 15px;
}

.page-header {
    background: linear-gradient(135deg, #1a365d 0%, #0f172a 100%) !important;
    color: white;
    padding: 30px 30px 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-icon {
    backdrop-filter: blur(10px);
}

.header-icon svg {
    display: block;
    stroke: white;
}

.page-header h1 {
    color: white;
    margin: 0;
    font-size: 25px;
    font-weight: 600;
}

.page-subtitle {
    color: rgba(255, 255, 255, 0.9);
    margin: 3px 0 0 0;
    font-size: 14px;
}

.mindweco-conversations-wrap .mindweco-nav-tabs {
    margin: 0 15px 20px;
    border-bottom: none;
    display: flex;
    gap: 8px;
    background: #f8fafc;
    border-radius: 16px 16px 0 0;
    padding: 8px 8px 0 8px;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
    flex: 1;
}

.mindweco-conversations-wrap .nav-tab,
.mindweco-conversations-wrap .mindweco-nav-tab {
    padding: 14px 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    border-radius: 12px 12px 0 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    text-align: center;
}

.mindweco-conversations-wrap .nav-tab:hover,
.mindweco-conversations-wrap .mindweco-nav-tab:hover {
    color: #64748b !important;
    background: rgba(37, 99, 235, 0.08) !important;
    transform: translateY(-2px);
}

.mindweco-conversations-wrap .nav-tab-active,
.mindweco-conversations-wrap .mindweco-nav-tab.nav-tab-active {
    color: #64748b !important;
    background: #ffffff !important;
    box-shadow:
        0 -3px 10px rgba(37, 99, 235, 0.1),
        0 3px 0 0 #64748b inset !important;
    border-bottom: 3px solid #64748b !important;
}

.datepicker-wrapper {
    background: white;
    border-radius: 12px;
    padding: 14px 20px;
    margin: 0 15px 20px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.datepicker-all-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.filter-icon {
    background: linear-gradient(135deg, #1a365d 0%, #0f172a 100%);
    padding: 8px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-icon svg {
    stroke: white;
}

.filter-header h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    white-space: nowrap;
}

* Vertical divider */ .row-divider {
    width: 1px;
    height: 36px;
    background: #e5e7eb;
    flex-shrink: 0;
}

.date-inputs-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.date-input-group {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.date-input-group label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    color: #374151;
    font-size: 12px;
    white-space: nowrap;
    margin: 0;
}

.date-input-group label svg {
    stroke: #667eea;
}

.datepicker {
    padding: 8px 10px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    width: 130px;
}

.datepicker:hover {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.datepicker:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.date-separator {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.date-separator svg {
    stroke: #9ca3af;
}

.filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.btn-primary,
.btn-secondary {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #1a365d 0%, #0f172a 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn.load-convs {
    background: #e0ecff;
    color: #667eea;
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

#loading-spinner {
    display: none;
}

#loading-spinner.active {
    display: flex;
    align-items: center;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

#loading-spinner {
    display: none;
}

#loading-spinner.active {
    display: flex;
    align-items: center;
}

#conversations-results {
    margin: 0 15px;
    padding: 0;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding: 0;
}

.results-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-count {
    background: linear-gradient(135deg, #1a365d 0%, #0f172a 100%) !important;
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
}

.conversations-table-container {
    margin-top: 15px;
}

.conversations-table-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.conversations-table {
    width: 100%;
    min-width: 880px;
    border-collapse: collapse;
}

.unanswered-table {
    min-width: 1120px;
    table-layout: fixed;
}

.conversations-table thead th {
    background: #f8fafc;
    color: #374151;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    padding: 12px 14px;
    text-align: left;
    text-transform: uppercase;
    border-bottom: 1px solid #e5e7eb;
}

.conversations-table tbody td {
    color: #4b5563;
    font-size: 13px;
    line-height: 1.4;
    padding: 12px 14px;
    vertical-align: middle;
}

.table-action.btn-download-chat {
    background: #e0ecff;
    color: #667eea;
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.table-action.btn-view-conversation,
.table-action.btn-view-details {
    background: #f3f4f6;
    color: #374151;
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.conversation-row {
    border-bottom: 1px solid #e5e7eb;
}
.conversations-table tbody tr:last-child td {
    border-bottom: none;
}

.conversations-table tbody tr:hover {
    background: #f9fafb;
}

.question-cell {
    width: 40%;
    color: #111827;
    font-weight: 600;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.unanswered-table th:nth-child(1),
.unanswered-table td:nth-child(1) {
    width: 18%;
}

.unanswered-table td.conversation-session {
    display: table-cell;
    max-width: none;
}

.unanswered-table td.conversation-session .session-icon,
.unanswered-table td.conversation-session .session-id {
    display: inline-flex;
    vertical-align: middle;
}

.unanswered-table td.conversation-session .session-id {
    max-width: calc(100% - 44px);
}

.unanswered-table th:nth-child(3),
.unanswered-table td:nth-child(3),
.unanswered-table th:nth-child(4),
.unanswered-table td:nth-child(4),
.unanswered-table th:nth-child(5),
.unanswered-table td:nth-child(5) {
    width: 12%;
}

.unanswered-table th:nth-child(6),
.unanswered-table td:nth-child(6) {
    width: 6%;
}

.conversation-session {
    max-width: 280px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.conversation-session .session-id {
    display: block;
    max-width: 260px;
    color: #111827;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.session-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #eef2ff;
    color: #2c51a0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
}

.session-icon svg {
    width: 16px;
    height: 16px;
}

.question-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 86px;
    padding: 4px 9px;
    background: #e0ecff;
    color: #2c51a0;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.conversation-table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: all 0.2s ease;
}

.table-action:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #f8fbff;
}

.conversations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.conversation-card {
    background: white;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.conversation-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.12);
    border-color: #667eea;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a365d 0%, #0f172a 100%) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}

.card-info {
    flex: 1;
    min-width: 0;
}

.card-session-id {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-session-id svg {
    width: 11px;
    height: 11px;
    stroke: #9ca3af;
    flex-shrink: 0;
}

.card-time {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 2px;
}

.card-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.card-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #6b7280;
}

.card-meta-item svg {
    width: 13px;
    height: 13px;
    stroke: #9ca3af;
    flex-shrink: 0;
}

.card-meta-value {
    color: #374151;
    font-weight: 500;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid #f3f4f6;
}

.card-questions {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #667eea;
    font-size: 13px;
    font-weight: 600;
}

.card-questions svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

.card-action {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: none;
    border: none;
    padding: 3px 6px;
}

.card-action svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
}

.card-action:hover {
    color: #667eea;
}

.empty-state {
    text-align: center;
    border-radius: 12px;
}

.empty-state svg {
    stroke: #d1d5db;
    margin-bottom: 15px;
}

.empty-state h3 {
    color: #1f2937;
    font-size: 18px;
    margin: 0 0 8px 0;
}

.empty-state p {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.75);
    z-index: 9999;
    overflow-y: auto;
    padding: 30px 15px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-container {
    max-width: 1000px;
    margin: 10px auto;
    background: white;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header-bar {
    background: linear-gradient(135deg, #1a365d 0%, #0f172a 100%) !important;
    padding: 18px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    color: white;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 10px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #0a1442;
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #5568d3;
}

.info-section {
    margin-bottom: 22px;
}

.info-section:last-child {
    margin-bottom: 0;
}

.info-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f3f4f6;
}

.info-section-icon {
    width: 34px;
    height: 34px;
    background: linear-gradient(
        135deg,
        rgba(102, 126, 234, 0.1) 0%,
        rgba(118, 75, 162, 0.1) 100%
    );
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-section-icon svg {
    width: 18px;
    height: 18px;
    stroke: #667eea;
}

.info-section-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
}

.conversation-info-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    table-layout: fixed;
}

.conversation-info-table th,
.conversation-info-table td {
    padding: 11px 14px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 13px;
    line-height: 1.45;
    vertical-align: top;
}

.conversation-info-table tr:last-child th,
.conversation-info-table tr:last-child td {
    border-bottom: none;
}

.conversation-info-table th {
    width: 190px;
    background: #f8fafc;
    color: #374151;
    font-weight: 700;
    text-align: left;
}

.conversation-info-table td {
    color: #111827;
    font-weight: 600;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.session-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.info-item {
    background: #f9fafb;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.info-item:hover {
    background: #f3f4f6;
    border-color: #667eea;
}

.info-label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.info-label svg {
    width: 12px;
    height: 12px;
    stroke: #9ca3af;
}

.info-value {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    word-break: break-word;
}

.info-badge {
    display: inline-block;
    background: linear-gradient(135deg, #1a365d 0%, #0f172a 100%) !important;
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.qa-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.qa-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
}

.qa-card:hover {
    border-color: #667eea;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.12);
}

.qa-question-block {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.qa-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #1a365d 0%, #0f172a 100%) !important;
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.qa-question-text {
    flex: 1;
    font-weight: 600;
    font-size: 14px;
    color: #1f2937;
    line-height: 1.5;
}

.qa-answer-block {
    display: flex;
    gap: 10px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 10px;
    margin-bottom: 10px;
}

.qa-answer-icon {
    width: 28px;
    height: 28px;
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.qa-answer-text {
    flex: 1;
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
}

.qa-timestamp {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #9ca3af;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
}

.qa-timestamp span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.qa-timestamp svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
}

#conversation-modal .modal-container {
    max-width: 1120px;
}

#conversation-modal .modal-body {
    background: #f8fafc;
    padding: 0;
}

.conversation-detail-view {
    color: #172033;
}

.conversation-detail-summary {
    display: grid;
    grid-template-columns: minmax(230px, 1fr) minmax(360px, 1.4fr) auto;
    gap: 16px;
    align-items: stretch;
    padding: 18px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.conversation-summary-main,
.conversation-summary-stat {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
}

.conversation-summary-main {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    min-width: 0;
}

.conversation-summary-kicker {
    color: #2f5d62;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
}

.conversation-summary-main strong {
    color: #172033;
    font-size: 18px;
    line-height: 1.25;
}

.conversation-summary-id {
    color: #64748b;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.conversation-summary-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.conversation-summary-stat {
    padding: 12px;
    min-width: 0;
}

.conversation-summary-stat span {
    display: block;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.conversation-summary-stat strong {
    display: block;
    color: #172033;
    font-size: 13px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.conversation-download-pdf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 136px;
    min-height: 44px;
    align-self: center;
    border: 1px solid #172033;
    border-radius: 8px;
    background: #172033;
    color: #ffffff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    padding: 12px 14px;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.conversation-download-pdf svg {
    width: 16px;
    height: 16px;
}

.conversation-download-pdf:hover {
    background: #2f5d62;
    border-color: #2f5d62;
    transform: translateY(-1px);
}

.conversation-timeline {
    position: relative;
    padding: 22px 24px 26px 58px;
}

.conversation-timeline::before {
    content: "";
    position: absolute;
    top: 22px;
    bottom: 26px;
    left: 34px;
    width: 2px;
    background: #d8dee4;
}

.conversation-entry {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.conversation-entry:last-child {
    margin-bottom: 0;
}

.conversation-entry-marker {
    position: relative;
    z-index: 1;
    width: 34px;
    height: 34px;
    border: 2px solid #2f5d62;
    border-radius: 50%;
    background: #ffffff;
    color: #2f5d62;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
}

.conversation-entry-content {
    min-width: 0;
}

.conversation-entry-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
}

.conversation-entry-meta strong {
    color: #172033;
    font-size: 13px;
    line-height: 1.35;
}

.conversation-entry-meta span,
.conversation-message-time {
    color: #74808a;
    font-size: 12px;
    line-height: 1.4;
}

.conversation-message {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    margin-bottom: 10px;
    overflow: hidden;
}

.conversation-message:last-child {
    margin-bottom: 0;
}

.conversation-message-question {
    border-left: 4px solid #172033;
}

.conversation-message-answer {
    border-left: 4px solid #2f5d62;
    background: #fbfdfe;
}

.conversation-message-label {
    padding: 10px 14px 0;
    color: #52616b;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
}

.conversation-message-text {
    padding: 7px 14px 13px;
    color: #222831;
    font-size: 14px;
    line-height: 1.65;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.conversation-message-time {
    padding: 0 14px 12px;
}

.loading-state,
.error-state {
    text-align: center;
    padding: 60px 30px;
}

.loading-state .spinner,
.error-state svg {
    margin-bottom: 15px;
}

.loading-state p,
.error-state p {
    color: #6b7280;
    font-size: 14px;
    margin-top: 10px;
}

.error-state h3 {
    color: #dc2626;
    font-size: 18px;
    font-weight: 700;
    margin: 10px 0;
}

@media (max-width: 1300px) {
    .conversations-grid {
        grid-template-columns: 1fr;
    }

    .date-inputs-row {
        flex-direction: row;
    }

    .date-separator {
        transform: rotate(90deg);
        padding: 0;
    }

    .filter-actions {
        flex-direction: row;
        width: 100%;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .session-info-grid {
        grid-template-columns: 1fr;
    }

    .modal-container {
        border-radius: 12px;
    }

    .modal-body {
        padding: 18px;
    }
}

@media (max-width: 768px) {
  .mindweco-conversations-wrap {
    padding: 10px 8px 18px;
  }

  .page-header {
    padding: 20px 16px;
    border-radius: 10px;
  }

  .header-content {
    align-items: flex-start;
  }

  .page-header h1 {
    font-size: 21px;
    line-height: 1.25;
  }

  .page-subtitle {
    font-size: 13px;
    line-height: 1.4;
  }

  .mindweco-conversations-wrap .mindweco-nav-tabs {
    margin: 0 0 14px;
    padding: 6px;
    border-radius: 12px;
    gap: 6px;
  }

  .mindweco-conversations-wrap .nav-tab,
  .mindweco-conversations-wrap .mindweco-nav-tab {
    padding: 10px 8px;
    border-radius: 9px;
    font-size: 13px;
    min-height: 42px;
  }

  .datepicker-wrapper {
    margin: 0 0 14px;
    padding: 14px;
  }

  .datepicker-all-row {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .filter-header {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .date-inputs-row {
    gap: 12px;
  }

  .date-input-group {
    width: 100%;
  }

  .date-input-group input {
    width: 100%;
  }

  .date-separator {
    transform: rotate(90deg);
    margin: 4px 0;
    align-self: center;
  }

  .filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .filter-actions button {
    flex: 1;
    min-width: 140px;
  }

  #loading-spinner {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .results-header h3 {
    font-size: 16px;
  }

  .conversations-table-wrap {
    overflow-x: visible;
    border: none;
    background: transparent;
  }

  .conversations-table,
  .unanswered-table {
    min-width: 0;
    width: 100%;
    table-layout: auto;
  }

  .conversations-table thead {
    display: none;
  }

  .conversations-table tbody,
  .conversations-table tr,
  .conversations-table td {
    display: block;
    width: 100%;
  }

  .conversations-table tbody tr.conversation-row {
    margin-bottom: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
  }

  .conversations-table tbody tr:last-child td {
    border-bottom: 1px solid #e5e7eb;
  }

  .conversations-table tbody tr:last-child td:last-child,
  .conversations-table tbody td:last-child {
    border-bottom: none;
  }

  .conversations-table tbody td,
  .unanswered-table td.conversation-session {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: right;
  }

  .conversations-table tbody td::before {
    content: attr(data-label);
    flex: 0 0 105px;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    text-align: left;
    text-transform: uppercase;
  }

  .conversation-session .session-id,
  .unanswered-table td.conversation-session .session-id {
    max-width: none;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-overflow: clip;
  }

  .conversation-session .session-icon,
  .unanswered-table td.conversation-session .session-icon {
    display: none;
  }

  .question-cell {
    width: 100%;
    text-align: left;
  }

  .conversation-table-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .modal-overlay {
    padding: 8px;
    align-items: flex-start;
  }

  .modal-container {
    width: 100%;
    max-height: calc(100vh - 16px);
    margin-top: 8px;
  }

  .modal-header-bar {
    padding: 14px 16px;
  }

  .modal-title {
    font-size: 17px;
    line-height: 1.3;
  }

  .modal-body {
    padding: 14px;
    max-height: calc(100vh - 92px);
  }

  .info-section {
    margin-bottom: 18px;
  }

  .info-section-header {
    gap: 8px;
    margin-bottom: 10px;
  }

  .info-section-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }

  .info-section-header h3 {
    font-size: 15px;
  }

  .conversation-info-table,
  .conversation-info-table tbody,
  .conversation-info-table tr,
  .conversation-info-table th,
  .conversation-info-table td {
    display: block;
    width: 100%;
  }

  .conversation-info-table tr {
    border-bottom: 1px solid #e5e7eb;
  }

  .conversation-info-table tr:last-child {
    border-bottom: none;
  }

  .conversation-info-table th {
    border-bottom: none;
    padding: 10px 12px 2px;
    font-size: 12px;
  }

  .conversation-info-table td {
    padding: 4px 12px 10px;
    border-bottom: none;
    font-size: 13px;
  }

  .qa-card {
    padding: 12px;
  }

  .qa-question-block,
  .qa-answer-block {
    gap: 8px;
  }

  .qa-timestamp {
    flex-direction: column;
    gap: 6px;
  }

  .conversation-detail-summary {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
  }

  .conversation-summary-stats {
    grid-template-columns: 1fr;
  }

  .conversation-download-pdf {
    width: 100%;
  }

  .conversation-timeline {
    padding: 18px 14px 20px 14px;
  }

  .conversation-timeline::before {
    display: none;
  }

  .conversation-entry {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .conversation-entry-marker {
    width: auto;
    height: auto;
    border-radius: 999px;
    justify-self: start;
    padding: 5px 10px;
  }

  .conversation-entry-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .conversation-message-text {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .mindweco-conversations-wrap .mindweco-nav-tabs {
    flex-direction: column;
  }

  .mindweco-conversations-wrap .nav-tab,
  .mindweco-conversations-wrap .mindweco-nav-tab {
    width: 100%;
  }

  .date-inputs-row {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-actions button {
    width: 100%;
    flex: none;
  }

  .filter-header h2 {
    font-size: 16px;
  }

  .conversations-table tbody td,
  .unanswered-table td.conversation-session {
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    text-align: left;
  }

  .conversations-table tbody td::before {
    flex-basis: auto;
  }

  .conversation-table-actions {
    justify-content: flex-start;
  }

  .conversation-table-actions .table-action,
  .conversation-table-actions .btn-delete-conversation {
    width: 100%;
    justify-content: center;
  }

  .modal-body {
    padding: 12px;
  }
}

.ui-datepicker {
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2) !important;
    border: none !important;
    padding: 10px !important;
}

.ui-datepicker-title {
    color: white !important;
}

.ui-state-default {
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
}

.ui-state-hover,
.ui-state-active {
    background: #667eea !important;
    color: white !important;
    border-color: #667eea !important;
}

.header-filter-load {
    display: flex;
    justify-content: space-between;
}

.btn.load-convs {
    background: #e0ecff;
    color: #667eea;
    padding: 8px 18px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    height: 20%;
}

.btn.load-convs:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

#delete-conv-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 10px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
}

#delete-conv-modal.show {
    opacity: 1;
    visibility: visible;
}

#delete-conv-modal .modal-container {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 340px;
    max-width: 95%;
    overflow: hidden;
    animation: fadeInScale 0.2s ease;
}

#delete-conv-modal .modal-header-bar {
    background: linear-gradient(135deg, #1a365d 0%, #0f172a 100%);
    color: #fff;
    font-weight: 700;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#delete-conv-modal .modal-title {
    font-size: 18px;
}

#delete-conv-modal .modal-close {
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.8;
    padding: 4px;
    transition: opacity 0.2s;
}

#delete-conv-modal .modal-close:hover {
    opacity: 1;
}

#delete-conv-modal .modal-body {
    padding: 20px 18px;
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
    text-align: center;
}

#delete-conv-modal .modal-actions {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

#delete-conv-modal .btn {
    min-width: 110px;
    padding: 8px 16px;
    font-weight: 700;
    border-radius: 8px;
    font-size: 13px;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
}

#delete-conv-modal .btn-secondary {
    background: white;
    color: #64748b;
    border: 2px solid #cbd5e1;
}

#delete-conv-modal .btn-secondary:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #475569;
}

#delete-conv-modal .btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

#delete-conv-modal .btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.conversations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.conversation-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
    transition: all 0.2s ease;
    box-shadow: none;
}

.conversation-card:hover {
    border-color: #cbd5e1;
    background: #fafafa;
}

.card-header-session {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    border: none;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    border: none;
    justify-content: space-between;
}

.card-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #3b82f6);
    color: white;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-info {
    display: flex;
    flex-direction: column;
}

.card-session-id {
    font-size: 13px;
    font-weight: 400;
    color: #9ca3af;
}

.card-time {
    font-size: 11px;
    margin-top: 2px;
    font-weight: bold;
    color: #374151;
}

.card-meta {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0;
    border: none;
}

.card-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #4b5563;
}

.card-meta-item svg {
    width: 13px;
    height: 13px;
    stroke: #9ca3af;
}

.card-footer {
    margin-top: 10px;
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-questions {
    background: #e0ecff;
    color: #2c51a0;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 16px;
    font-weight: 500;
}

.card-questions svg {
    display: none;
}

.card-action {
    font-size: 12px;
    font-weight: 500;
    color: #858585;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-action svg {
    width: 13px;
    height: 13px;
}

.card-action:hover {
    color: #2563eb;
}

.actions {
    display: flex;
    flex-direction: column;
    justify-content: end;
    align-items: end;
}

.btn-delete-conversation {
    background: transparent;
    border: none;
    cursor: pointer;
    min-width: 30px;
    min-height: 30px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc2626;
    border-radius: 6px;
    transition: color 0.2s ease;
}

.btn-delete-conversation:hover {
    background: #fef2f2;
    color: #b91c1c;
}

.btn-delete-conversation svg {
    width: 18px;
    height: 18px;
}

.ui-datepicker-header {
    background: linear-gradient(135deg, #1a365d 0%, #0f172a 100%) !important;
    border: none !important;
    border-radius: 8px !important;
    color: white !important;
}

.info-value {
    word-break:break-all
}

.info-value-toal-question {
    font-size:24px;
    color:#667eea;
}
