/* Dashboard Custom Styles */
/* Spinning animation for loading states */
.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
:root {
    --primary-color: #00265e;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-bg: #f8f9fa;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: #333;
}

/* Navbar */
.navbar {
    background-color: var(--primary-color) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.card-header {
    background-color: var(--primary-color);
    color: white;
    border-radius: 10px 10px 0 0 !important;
    font-weight: 600;
}

/* Statistics Cards */
.stats-card {
    text-align: center;
    transition: transform 0.2s;
}

.stats-card:hover {
    transform: translateY(-5px);
}

.stats-card h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 10px 0;
}

.stats-card .card-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
}

/* Tables */
.table th {
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 38, 94, 0.05);
}

/* Tabs */
.nav-tabs .nav-link {
    color: #666;
    font-weight: 500;
    border: none;
    border-bottom: 3px solid transparent;
}

.nav-tabs .nav-link:hover {
    border-color: #ddd;
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    background-color: transparent;
    border-color: var(--primary-color);
    font-weight: 600;
}

/* Conversation Display */
.conversation-message {
    border-radius: 18px;
    padding: 10px 16px;
    margin-bottom: 8px;
    word-wrap: break-word;
    max-width: 70%;
    display: inline-block;
    clear: both;
    position: relative;
}

.user-message {
    background-color: #007bff;
    color: white;
    float: right;
    text-align: left;
    margin-left: 30%;
    border-bottom-right-radius: 4px;
}

.user-message .message-timestamp {
    color: rgba(255, 255, 255, 0.8);
}

.bot-message {
    background-color: #e9ecef;
    color: #333;
    float: left;
    text-align: left;
    margin-right: 30%;
    border-bottom-left-radius: 4px;
    line-height: 1.5;
}

.message-timestamp {
    font-size: 0.7rem;
    color: #666;
    margin-top: 4px;
    opacity: 0.7;
}

/* Remove extra paragraph margins in messages */
.conversation-message p {
    margin: 0;
}

.conversation-message div {
    margin: 0;
}

/* Ensure proper text wrapping for long messages */
.bot-message {
    white-space: normal;
    word-break: break-word;
}

/* Prescreening Results Styling */
#prescreening-results .card {
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

#prescreening-results .card-title {
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* Badges */
.badge {
    padding: 5px 10px;
    font-weight: 500;
}

.badge-success {
    background-color: var(--success-color);
}

.badge-warning {
    background-color: var(--warning-color);
    color: #212529;
}

.badge-info {
    background-color: var(--info-color);
}

/* Buttons */
.btn-view {
    padding: 4px 12px;
    font-size: 0.875rem;
}

/* Modal */
.modal-header {
    background-color: var(--primary-color);
    color: white;
}

.modal-header .btn-close {
    filter: invert(1);
}

/* Conversation Modal Specific */
#conversationModal .modal-dialog {
    max-width: 90vw;
    height: 85vh;
}

#conversationModal .modal-content {
    height: 100%;
}

#conversationModal .modal-body {
    overflow: hidden;
    height: calc(100% - 120px); /* Subtract header and footer height */
}

.conversation-scroll {
    height: calc(85vh - 200px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 10px;
}

#prescreening-results {
    height: calc(85vh - 150px);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Search Input */
#search-conversations {
    max-width: 300px;
}

/* Loading Spinner */
.spinner-border {
    width: 1.5rem;
    height: 1.5rem;
    border-width: 0.2em;
}

/* Analytics Cards */
.analytics-card {
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #e3e6f0;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
}

.analytics-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.analytics-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin: 10px 0 5px 0;
}

.analytics-card h6 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.analytics-card small {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Business Intelligence Metrics */
.bi-metric {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
}

.bi-metric h6 {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

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

.metric-row span:first-child {
    font-weight: 500;
    color: #495057;
}

.metric-row span:last-child {
    font-weight: 600;
    color: var(--primary-color);
}

/* Chart Containers */
.card-body canvas {
    max-height: 300px;
}

/* Chart Loading States */
.chart-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
    color: #6c757d;
    font-size: 1.1rem;
}

.chart-error {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
    color: #dc3545;
    font-size: 1rem;
    text-align: center;
}

/* Analytics Tab Specific */
#analytics .card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a8a 100%);
}

#analytics .card-header small {
    opacity: 0.8;
}

/* Responsive Analytics */
@media (max-width: 768px) {
    .analytics-card h3 {
        font-size: 1.5rem;
    }
    
    .analytics-card h6 {
        font-size: 0.8rem;
    }
    
    .bi-metric {
        padding: 10px;
    }
    
    .metric-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .metric-row span:last-child {
        font-size: 1.1rem;
    }
}

/* Enhanced Conversation Interface */
.conversation-row {
    transition: all 0.2s ease;
}

.conversation-row:hover {
    background-color: rgba(0, 38, 94, 0.08) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

/* New ID Display */
.conversation-row code {
    background-color: #e3f2fd;
    color: #1565c0;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Sortable table headers */
.table th[data-sort] {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: color 0.2s ease;
}

.table th[data-sort]:hover {
    color: #1565c0;
}

.table th[data-sort] i {
    margin-left: 5px;
    opacity: 0.7;
}

/* Progress bars */
.progress {
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(45deg, #28a745, #20c997);
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    line-height: 20px;
    transition: width 0.6s ease;
}

/* Enhanced Message Layout */
.message-wrapper {
    display: flex;
    margin-bottom: 15px;
    align-items: flex-end;
}

.user-message-wrapper {
    justify-content: flex-end;
}

.bot-message-wrapper {
    justify-content: flex-start;
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-message {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-bottom-right-radius: 4px;
    margin-left: 20px;
}

.bot-message {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #333;
    border-bottom-left-radius: 4px;
    margin-right: 20px;
    border: 1px solid #dee2e6;
}

.message-text {
    line-height: 1.4;
    margin-bottom: 8px;
}

.message-timestamp {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 4px;
}

.user-message .message-timestamp {
    color: rgba(255, 255, 255, 0.8);
}

.bot-message .message-timestamp {
    color: #6c757d;
}

/* Enhanced Prescreening Results */
.prescreening-header {
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.prescreening-header h6 {
    color: var(--primary-color);
    font-weight: 600;
    margin: 0;
}

.prescreening-qa .qa-item {
    transition: background-color 0.2s ease;
}

.prescreening-qa .qa-item:hover {
    background-color: rgba(0, 38, 94, 0.02);
    border-radius: 6px;
    padding: 10px;
    margin: -10px;
}

.question {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.answer {
    color: #495057;
    line-height: 1.4;
}

.extracted-info {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.extracted-info div {
    margin-bottom: 8px;
}

.extracted-info div:last-child {
    margin-bottom: 0;
}

/* Enhanced Search */
.search-container {
    position: relative;
}

.search-clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.search-clear-btn:hover {
    color: #dc3545;
}

/* Status badges with enhanced styling */
.badge {
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.badge.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.badge.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%) !important;
    color: #212529 !important;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}

.badge.bg-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%) !important;
    box-shadow: 0 2px 4px rgba(23, 162, 184, 0.3);
}

.badge.bg-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.badge.bg-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #545b62 100%) !important;
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

/* Enhanced tooltips */
.tooltip {
    font-size: 0.75rem;
}

.tooltip-inner {
    background-color: #343a40;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Action buttons */
.btn-group .btn {
    transition: all 0.2s ease;
}

.btn-group .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Enhanced loading states */
.spinner-border {
    width: 2rem;
    height: 2rem;
    border-width: 0.25em;
    border-color: var(--primary-color);
    border-right-color: transparent;
}

.loading-text {
    color: #6c757d;
    font-size: 1rem;
    margin-top: 1rem;
}

/* Enhanced error states */
.alert {
    border: none;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f1b0b7 100%);
    color: #721c24;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #b8daff 100%);
    color: #0c5460;
}


@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced modal styling */
.modal-xl {
    max-width: 95vw;
}

.modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-radius: 15px 15px 0 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a8a 100%);
    padding: 1.5rem;
}

.modal-header .modal-title {
    font-weight: 600;
    font-size: 1.25rem;
}

.modal-body {
    padding: 1.5rem;
}

/* Override for specific modals that need no padding */
#conversationModal .modal-body {
    padding: 0;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

/* Table info styling */
#conversations-info {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Responsive enhancements */
@media (max-width: 768px) {
    .stats-card h2 {
        font-size: 2rem;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .user-message,
    .bot-message {
        margin-left: 10px;
        margin-right: 10px;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .badge {
        font-size: 0.65rem;
        padding: 4px 8px;
    }
    
    .btn-group .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .conversation-row code {
        font-size: 0.75rem;
        padding: 3px 6px;
    }
    
    .progress {
        height: 16px;
    }
    
    .progress-bar {
        font-size: 0.65rem;
        line-height: 16px;
    }
}

/* Question Order Drag and Drop Styles */
#sortable-criteria-inline .list-group-item {
    transition: all 0.2s ease;
    user-select: none;
    border: 1px solid #dee2e6;
    margin-bottom: 0.25rem;
    border-radius: 0.375rem;
    background: white;
}

#sortable-criteria-inline .list-group-item:hover {
    background-color: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#sortable-criteria-inline .list-group-item:active {
    cursor: grabbing !important;
}

#sortable-criteria-inline .list-group-item.drag-over {
    border-top: 3px solid #007bff;
    transform: translateY(2px);
    background-color: #e3f2fd;
}

.question-order-grip {
    color: #6c757d;
    transition: color 0.2s ease;
}

.question-order-grip:hover {
    color: #007bff;
}

/* Compact alert for question order info */
.alert-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
}

/* Sort order badges */
#sortable-criteria-inline .badge {
    min-width: 30px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Available investigators styling */
.investigator-available {
    transition: all 0.2s ease;
    border: 1px solid #e3e6f0 !important;
}

.investigator-available:hover {
    background-color: #e8f5e8 !important;
    border-color: #28a745 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.15);
}

.investigator-available:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.investigator-available .text-end {
    position: absolute;
    top: 8px;
    right: 8px;
}

.investigator-available .card-body {
    position: relative;
    padding-right: 2rem !important;
}

/* Available investigators styling for accordion (protocols list) */
.investigator-available-accordion {
    transition: all 0.2s ease;
    border: 1px solid #e3e6f0 !important;
}

.investigator-available-accordion:hover {
    background-color: #e8f5e8 !important;
    border-color: #28a745 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.15);
}

.investigator-available-accordion:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(40, 167, 69, 0.2);
}

.investigator-available-accordion .text-end {
    position: absolute;
    top: 4px;
    right: 4px;
}

.investigator-available-accordion .card-body {
    position: relative;
    padding-right: 1.5rem !important;
}

/* Compact investigator cards */
.investigator-card-compact {
    min-height: 60px;
    max-height: 60px;
}

.investigator-card-compact .card-body {
    position: relative;
    padding: 0.25rem !important;
    overflow: hidden;
}

.investigator-card-compact .text-truncate {
    max-width: calc(100% - 20px);
}

.investigator-card-compact:hover {
    background-color: #e8f5e8 !important;
    border-color: #28a745 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.15);
}

.investigator-card-compact .fw-bold {
    line-height: 1.2;
    margin-bottom: 0.1rem;
    font-size: 0.75rem;
}

.investigator-card-compact .text-muted {
    line-height: 1.1;
    font-size: 0.65rem;
}

/* ============================================
   Protocol Comparison Styles
   ============================================ */

/* Comparison table styling */
.comparison-table {
    font-size: 0.85rem;
}

.comparison-table th {
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
    padding: 8px 12px;
}

.comparison-table td {
    vertical-align: middle;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
}

.comparison-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Protocol column colors (from user's example) */
.comparison-table .protocol-col-0 {
    background-color: #E8F5E9; /* Light green */
}

.comparison-table .protocol-col-1 {
    background-color: #E3F2FD; /* Light blue */
}

.comparison-table .protocol-col-2 {
    background-color: #FCE4EC; /* Light pink */
}

.comparison-table .protocol-col-3 {
    background-color: #FFF3E0; /* Light orange */
}

.comparison-table .protocol-col-4 {
    background-color: #F3E5F5; /* Light purple */
}

/* Row header colors */
.comparison-table td[style*="cyan"],
.comparison-table td[style*="yellow"] {
    font-weight: 600;
    position: sticky;
    left: 0;
    z-index: 10;
}

/* Make comparison modal fullscreen */
#comparisonModal .modal-body {
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

/* Restrictiveness badges */
.restrictiveness-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Unique criterion badge */
.badge-sm {
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
}

/* Scrollable table container */
.table-responsive {
    max-height: 70vh;
    overflow-y: auto;
}

/* Sticky table headers */
.comparison-table thead th {
    position: sticky;
    top: 0;
    z-index: 20;
    background: white;
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
}

/* Hover effects */
.comparison-table tbody tr:hover {
    background-color: #f0f0f0;
}

/* View mode buttons */
.btn-check:checked + .btn {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ============================================
   COMPACT PROTOCOL COMPARISON STYLES
   ============================================ */

/* Compact modal header for comparison */
#comparisonModal .modal-header {
    padding: 0.75rem 1rem;
}

#comparisonModal .modal-header .modal-title {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Compact alert styling */
#comparisonModal .alert {
    margin-bottom: 0.5rem;
    padding: 0.5rem 1rem;
}

/* Compact card styling */
#comparisonModal .card {
    margin-bottom: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

#comparisonModal .card-body {
    padding: 0.75rem;
}

/* Compact protocol pills */
.protocol-pill-compact {
    font-size: 0.85rem;
    padding: 0.35rem 0.75rem;
}

/* Reduce table header padding */
.comparison-table thead th {
    padding: 0.5rem 0.75rem;
}

.comparison-table tbody td {
    padding: 0.5rem 0.75rem;
}

/* Compact category headers */
.comparison-table .table-secondary td,
.comparison-table .table-warning td {
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
}

/* Make badges more inline-friendly */
#comparisonModal .badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.6rem;
}

/* Compact button styling */
#comparisonModal .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* Timestamp Display - Dual format (relative + actual time) */
.timestamp-display {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.timestamp-relative {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.timestamp-actual {
    font-size: 0.75rem;
    color: #6c757d;
    font-style: italic;
}

/* ============================================
   Enhanced Filters Styling - Inline with Columns
   ============================================ */

/* Filter row in table header */
.filter-row th {
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    vertical-align: middle;
}

/* Filter select boxes in table header */
.filter-row .form-select {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    background-color: white;
    border: 1px solid #ced4da;
    transition: all 0.2s ease;
}

.filter-row .form-select:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 38, 94, 0.1);
}

.filter-row .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 38, 94, 0.25);
}

/* Clear filters button in header */
.card-header #clear-filters-btn {
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    transition: all 0.2s ease;
}

.card-header #clear-filters-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
    transform: translateY(-1px);
}

/* Session type toggle styling */
#session-type-toggle .btn {
    font-weight: 500;
    transition: all 0.2s ease;
}

#session-type-toggle .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.5);
    color: rgba(255, 255, 255, 0.9);
}

#session-type-toggle .btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
    color: white;
}

/* Batch actions styling */
#batch-actions-conversations .btn-danger {
    animation: fadeIn 0.3s ease-in;
}

#batch-actions-conversations .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

#batch-actions-conversations .btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Protocol Number column styling */
#conversations-table td:nth-child(5) code {
    background-color: #e3f2fd;
    color: #1565c0;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.75rem;
}

/* Condition column styling */
#conversations-table td:nth-child(4) small {
    font-size: 0.85rem;
    color: #6c757d;
}

/* Table header improvements */
#conversations-table thead tr:nth-child(2) th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.75rem 0.5rem;
}

/* Contact Status Badge Size Reduction */
#conversations-table .badge.bg-danger,
#conversations-table .badge.bg-success,
#conversations-table .badge.bg-warning {
    font-size: 0.7rem;
    padding: 4px 8px;
    font-weight: 500;
}

#conversations-table .badge.bg-danger {
    opacity: 0.85;
}

#conversations-table .badge.bg-warning {
    opacity: 0.9;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .filter-row .form-select {
        font-size: 0.75rem;
    }

    .card-header .d-flex {
        flex-direction: column;
        gap: 0.75rem;
    }
}