/* OnCallsAI - Component Styles (Light Theme) */

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--bg-primary);
}

/* Empty State */
.empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
    color: var(--primary-color);
}

.empty-state h2 {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.875rem;
}

/* File View */
.file-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* File Header */
.file-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.file-info h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.file-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.file-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.file-meta .fa-circle {
    font-size: 0.5rem;
}

.file-actions {
    display: flex;
    gap: 0.5rem;
}

/* Audio Player Section */
.audio-player-section {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.audio-tabs {
    display: flex;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-tertiary);
}

.audio-player {
    padding: 1.5rem;
}

/* Waveform */
.waveform-container {
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

#waveform {
    width: 100%;
    height: 80px;
}

/* Player Controls */
.player-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.time-display {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-family: monospace;
    min-width: 100px;
    background-color: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

.playback-speed select {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.volume-control input[type="range"] {
    width: 80px;
}

/* Transcription Section */
.transcription-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 1.5rem;
}

.transcription-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.transcription-header h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.transcription-legend {
    display: flex;
    gap: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.legend-item.insurance i {
    color: var(--insurance-color);
}

.legend-item.provider i {
    color: var(--provider-color);
}

/* Transcription Content */
.transcription-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.transcription-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--text-muted);
}

.transcription-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
    color: var(--primary-color);
}

/* Segment */
.segment {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    cursor: pointer;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.segment:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.segment.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.segment.insurance {
    border-left: 4px solid var(--insurance-color);
}

.segment.provider {
    border-left: 4px solid var(--provider-color);
}

.segment.deleted {
    opacity: 0.4;
    text-decoration: line-through;
}

/* Segment Speaker */
.segment-speaker {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    min-width: 140px;
}

.segment-speaker-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
}

.segment.insurance .segment-speaker-icon {
    background-color: var(--insurance-bg);
    color: var(--insurance-color);
}

.segment.provider .segment-speaker-icon {
    background-color: var(--provider-bg);
    color: var(--provider-color);
}

.segment-speaker-info {
    display: flex;
    flex-direction: column;
}

.segment-speaker-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
}

.segment-timestamp {
    font-size: 0.625rem;
    color: var(--text-muted);
    font-family: monospace;
}

/* Segment Content */
.segment-content {
    flex: 1;
}

.segment-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.segment-text[contenteditable="true"] {
    background-color: var(--bg-tertiary);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    outline: none;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Segment Actions */
.segment-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.segment:hover .segment-actions {
    opacity: 1;
}

.segment-action-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.segment-action-btn:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.segment-action-btn.delete:hover {
    background-color: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
}

.segment-action-btn.switch:hover {
    background-color: var(--warning-color);
    color: white;
    border-color: var(--warning-color);
}

.segment-action-btn.play:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.segment-action-btn.loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.segment-action-btn.loading::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border: 2px solid var(--text-muted);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Progress Indicator */
.progress-bar {
    width: 100%;
    height: 4px;
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: var(--radius-full);
    transition: width var(--transition-normal);
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-full);
}

.status-badge.pending {
    background-color: rgba(107, 114, 128, 0.1);
    color: var(--secondary-color);
}

.status-badge.processing {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.status-badge.completed {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.status-badge.error {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

/* Confirmation Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background-color: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    justify-content: space-between;
}

.modal-header i {
    font-size: 1.5rem;
    color: var(--warning-color);
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-body {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Modal Large (for New Template) */
.modal.modal-large {
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
}

/* New Template Modal Specific Styles */
#newTemplateModal .segments-section {
    margin-top: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    background-color: var(--bg-tertiary);
}

#newTemplateModal .segments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

#newTemplateModal .segments-header h4 {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#newTemplateModal .segments-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

#newTemplateModal .segments-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 300px;
    overflow-y: auto;
}

#newTemplateModal .new-template-segment {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem;
}

#newTemplateModal .segment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

#newTemplateModal .segment-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
}

#newTemplateModal .segment-role-select {
    flex: 1;
    max-width: 180px;
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
}

#newTemplateModal .segment-text-input {
    width: 100%;
    font-size: 0.875rem;
    resize: vertical;
    min-height: 50px;
}

#newTemplateModal .segment-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

#newTemplateModal .play-segment-btn {
    font-size: 0.75rem;
}

/* Transcription Content Header (Swap All Roles) */
.transcription-content .transcription-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0.5rem 0;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.swap-all-roles-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.swap-all-roles-btn:hover {
    background-color: var(--warning-color);
    color: white;
    border-color: var(--warning-color);
}

.swap-all-roles-btn i {
    font-size: 0.875rem;
}

/* ========================================
   BATCH MODE STYLES
   ======================================== */

/* Batch View */
.batch-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    overflow: hidden;
}

/* Batch Header */
.batch-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.batch-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.batch-title h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.batch-title h1 i {
    color: var(--primary-color);
}

.file-count {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
}

.batch-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.upload-btn {
    cursor: pointer;
}

.upload-btn input[type="file"] {
    display: none;
}

/* Main Upload Dropzone */
.upload-dropzone-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    background-color: var(--bg-secondary);
    text-align: center;
    transition: all var(--transition-fast);
    cursor: pointer;
    margin-bottom: 1.5rem;
}

.upload-dropzone-main:hover,
.upload-dropzone-main.dragover {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

.upload-dropzone-main i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    opacity: 0.7;
}

.upload-dropzone-main p {
    font-size: 1.125rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.upload-dropzone-main small {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* File Table */
.file-table-container {
    flex: 1;
    overflow: auto;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.file-table {
    width: 100%;
    border-collapse: collapse;
}

.file-table thead {
    position: sticky;
    top: 0;
    background-color: var(--bg-tertiary);
    z-index: 10;
}

.file-table th,
.file-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.file-table th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

.file-table tbody tr {
    transition: background-color var(--transition-fast);
}

.file-table tbody tr:hover {
    background-color: var(--bg-tertiary);
}

.file-table tbody tr.selected {
    background-color: var(--primary-light);
}

.file-table tbody tr.processing {
    background-color: rgba(245, 158, 11, 0.1);
}

.col-checkbox {
    width: 40px;
    text-align: center;
}

.col-filename {
    min-width: 200px;
}

.col-duration {
    width: 80px;
}

.col-status {
    width: 140px;
}

.col-progress {
    width: 150px;
}

.col-actions {
    width: 200px;
}

/* File Row Styling */
.file-row-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.file-row-name i {
    color: var(--primary-color);
}

.file-row-name span {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Voice Tag in File Row */
.file-voice-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.25rem;
    padding: 0.125rem 0.5rem;
    font-size: 0.6875rem;
    color: var(--primary-color);
    background-color: var(--primary-light);
    border-radius: var(--radius-full);
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-voice-tag i {
    font-size: 0.625rem;
}

/* Status Badges in Table */
.status-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-full);
}

.status-indicator.pending {
    background-color: rgba(107, 114, 128, 0.1);
    color: var(--secondary-color);
}

.status-indicator.uploading {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.status-indicator.analyzing {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.status-indicator.analyzed {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.status-indicator.reconstructing {
    background-color: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.status-indicator.complete {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--success-color);
}

.status-indicator.error {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

/* Progress Bar in Table */
.progress-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mini-progress-bar {
    flex: 1;
    height: 6px;
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.mini-progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.mini-progress-fill.success {
    background-color: var(--success-color);
}

.progress-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    min-width: 35px;
}

/* Action Buttons in Table */
.action-buttons {
    display: flex;
    gap: 0.375rem;
}

.action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    font-size: 0.875rem;
}

.action-btn:hover:not(:disabled) {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.action-btn.view:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.action-btn.play:hover:not(:disabled) {
    background-color: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.action-btn.download:hover:not(:disabled) {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.action-btn.delete:hover:not(:disabled) {
    background-color: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
}

.action-btn.notes:hover:not(:disabled) {
    background-color: var(--warning-color);
    color: white;
    border-color: var(--warning-color);
}

/* Batch Progress */
.batch-progress {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    margin-top: 1rem;
}

.batch-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.batch-progress-header span {
    font-weight: 500;
    color: var(--text-primary);
}

.batch-progress-bar {
    height: 8px;
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.batch-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.batch-progress-stats {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* Back Button */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
    color: var(--primary-color);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
}

.back-btn:hover {
    text-decoration: underline;
}

/* Modal Enhancements */
.modal-large {
    max-width: 700px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-large .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
}

.modal-close-btn:hover {
    color: var(--text-primary);
}

.modal-large .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.modal-transcription-content {
    max-height: 400px;
    overflow-y: auto;
}

.modal-transcription-content .segment {
    margin-bottom: 0.75rem;
}

/* Sidebar Minimal */
.sidebar-minimal {
    width: 280px;
    min-width: 280px;
}

.sidebar-info {
    padding: 1rem;
    margin: 1rem;
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.sidebar-info h3 {
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.sidebar-info li {
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}

/* Small buttons */
.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

/* Worker Selector */
.worker-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--bg-tertiary);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.worker-selector label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: help;
}

.worker-selector select {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    padding-right: 0.5rem;
}

.worker-selector select:focus {
    outline: none;
}

/* Voice Rotation Toggle */
.voice-rotation-toggle {
    display: flex;
    align-items: center;
}

.voice-rotation-toggle .toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.voice-rotation-toggle .toggle-label:hover {
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.voice-rotation-toggle input[type="checkbox"] {
    display: none;
}

.voice-rotation-toggle input[type="checkbox"]:checked + .toggle-text {
    color: var(--primary-color);
    font-weight: 500;
}

.voice-rotation-toggle input[type="checkbox"]:checked ~ .toggle-label,
.voice-rotation-toggle:has(input:checked) .toggle-label {
    background-color: var(--primary-light);
    border-color: var(--primary-color);
}

.toggle-text {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.toggle-text i {
    font-size: 0.75rem;
}

/* ========================================
   MULTI-SELECT & NOTES STYLES
   ======================================== */

/* Transcription Header Actions */
.transcription-content .transcription-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.75rem 0;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.transcription-actions-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.transcription-actions-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Select All Checkbox */
.select-all-segments {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    padding: 0.375rem 0.75rem;
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.select-all-segments:hover {
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.select-all-segments input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* Selected Actions */
.selected-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.selected-count {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary-color);
    background-color: var(--primary-light);
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
}

/* Role Change Buttons */
.role-change-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.role-change-btn.insurance-btn {
    border-color: var(--insurance-color);
}

.role-change-btn.insurance-btn:hover {
    background-color: var(--insurance-color);
    color: white;
}

.role-change-btn.provider-btn {
    border-color: var(--provider-color);
}

.role-change-btn.provider-btn:hover {
    background-color: var(--provider-color);
    color: white;
}

/* Notes Button */
.notes-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.notes-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.notes-btn i {
    font-size: 0.875rem;
}

/* Save Status Indicator */
.save-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-full);
}

.save-status.saved {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.save-status.unsaved {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.save-status.saving {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}

.save-status.needs-reconstruction {
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--warning-color);
    font-weight: 600;
}

.save-status i {
    font-size: 0.625rem;
}

/* Save Changes Button */
.save-changes-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--success-color), #059669);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.save-changes-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4);
}

.save-changes-btn:active {
    transform: translateY(0);
}

.save-changes-btn i {
    font-size: 0.875rem;
}

/* Segment Checkbox */
.segment-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 0.5rem;
}

.segment-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* Segment Selected State */
.segment.selected {
    background-color: var(--primary-light);
    border-color: var(--primary-color);
}

/* Notes Modal */
.notes-content {
    max-height: 60vh;
    overflow-y: auto;
}

.notes-category {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.notes-category h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.notes-category h4 i {
    font-size: 0.875rem;
}

.notes-fields {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.625rem;
}

.notes-field {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    padding: 0.5rem;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.notes-field-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.notes-field-value {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Notes Modal Header Icon */
#notesModal .modal-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#notesModal .modal-header h3 i {
    color: var(--warning-color);
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-input::placeholder {
    color: var(--text-muted);
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

select.form-input {
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Save Template Modal */
#saveTemplateModal .modal {
    max-width: 500px;
}

#saveTemplateModal .modal-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#saveTemplateModal .modal-header h3 i {
    color: var(--primary-color);
}

/* Edit Template Modal */
#editTemplateModal .modal {
    max-width: 500px;
}

#editTemplateModal .modal-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#editTemplateModal .modal-header h3 i {
    color: var(--primary-color);
}

/* ==========================================
   Automation View Styles
   ========================================== */

/* Automation Select Header */
.automation-select-header {
    padding: 1.5rem;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.automation-select-row {
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.automation-select-group {
    flex: 1;
    min-width: 300px;
}

.automation-select-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.automation-select-wrapper {
    display: flex;
    gap: 0.5rem;
}

.automation-template-dropdown {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

#automationMainControlsTop {
    display: flex;
    gap: 0.5rem;
}

/* Automation Empty State */
.automation-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
    color: var(--text-muted);
}

.automation-empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.automation-empty-state p {
    font-size: 0.9rem;
}

/* Sidebar Hint */
.sidebar-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding: 0.5rem;
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

/* ==========================================
   Segment CRUD Styles
   ========================================== */

/* Section Header Actions */
.section-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Segment Actions */
.segment-actions {
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.template-segment-item:hover .segment-actions {
    opacity: 1;
}

.segment-action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.segment-action-btn.edit {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.segment-action-btn.edit:hover {
    background-color: var(--primary-color);
    color: white;
}

.segment-action-btn.delete {
    background-color: #fee2e2;
    color: var(--danger-color);
}

.segment-action-btn.delete:hover {
    background-color: var(--danger-color);
    color: white;
}

.segment-action-btn.play {
    background-color: #d1fae5;
    color: #059669;
}

.segment-action-btn.play:hover {
    background-color: #059669;
    color: white;
}

.segment-action-btn.play.playing {
    background-color: #059669;
    color: white;
}

/* Template Segment Item with actions */
.template-segment-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    background-color: var(--bg-secondary);
    border-left: 4px solid var(--border-color);
    margin-bottom: 0.75rem;
    transition: box-shadow var(--transition-fast);
}

.template-segment-item:hover {
    box-shadow: var(--shadow-md);
}

.template-segment-item.insurance {
    border-left-color: var(--primary-color);
}

.template-segment-item.provider {
    border-left-color: var(--success-color);
}

.template-segment-item .segment-content {
    flex: 1;
}

/* Segment Modal */
#segmentModal .modal {
    max-width: 500px;
}

#segmentModal .modal-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#segmentModal .modal-header h3 i {
    color: var(--primary-color);
}

/* ==========================================
   Live Speech Recognition Styles
   ========================================== */

/* Live transcript entry */
.call-log-entry.live-transcript {
    background-color: #fef3c7;
    border-left: 3px solid #f59e0b;
    animation: pulse-border 1.5s ease-in-out infinite;
}

.call-log-entry.live-transcript .call-log-role {
    color: #d97706;
}

.call-log-entry.live-transcript .live-text {
    font-style: italic;
    color: #92400e;
}

@keyframes pulse-border {
    0%, 100% { border-left-color: #f59e0b; }
    50% { border-left-color: #fbbf24; }
}

/* Waiting for input indicator on step */
.template-step.waiting-for-input {
    border-left: 4px solid #f59e0b;
    background-color: #fffbeb;
    animation: waiting-pulse 2s ease-in-out infinite;
}

.template-step.waiting-for-input::before {
    content: '\f130';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 10px;
    top: 10px;
    color: #f59e0b;
    animation: mic-pulse 1s ease-in-out infinite;
}

@keyframes waiting-pulse {
    0%, 100% { background-color: #fffbeb; }
    50% { background-color: #fef3c7; }
}

@keyframes mic-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.1); }
}

/* Can speak together indicator - shows user they can speak multiple segments at once */
.template-step.can-speak-together {
    border-left: 3px dashed #fbbf24;
    background-color: #fefce8;
    opacity: 0.85;
}

.template-step.can-speak-together::after {
    content: '(can speak together)';
    font-size: 0.7rem;
    color: #d97706;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-style: italic;
}

/* Call log entry styling */
.call-log-entry {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--border-color);
    background-color: var(--bg-secondary);
}

.call-log-entry.insurance {
    border-left-color: var(--primary-color);
    background-color: #eff6ff;
}

.call-log-entry.provider {
    border-left-color: var(--success-color);
    background-color: #f0fdf4;
}

.call-log-entry.system {
    border-left-color: var(--text-muted);
    background-color: var(--bg-tertiary);
    font-style: italic;
}

.call-log-role {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.call-log-entry.insurance .call-log-role {
    color: var(--primary-color);
}

.call-log-entry.provider .call-log-role {
    color: var(--success-color);
}

.call-log-entry.system .call-log-role {
    color: var(--text-muted);
}

.call-log-text {
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.call-log-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Speech indicator animation */
.speech-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #fef3c7;
    border-radius: var(--radius-md);
    color: #92400e;
    font-size: 0.875rem;
}

.speech-indicator i {
    animation: mic-pulse 1s ease-in-out infinite;
}

/* ==========================================
   Settings View Styles
   ========================================== */

.settings-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: auto;
    padding: 1.5rem;
}

.settings-header {
    margin-bottom: 1.5rem;
}

.settings-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-header h1 i {
    color: var(--primary-color);
}

.settings-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
}

.settings-section-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.settings-section-card h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.settings-section-card h2 i {
    color: var(--primary-color);
}

.settings-form-group {
    margin-bottom: 1rem;
}

.settings-form-group:last-child {
    margin-bottom: 0;
}

.settings-form-group label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.settings-form-group select.form-input {
    width: 100%;
    max-width: 400px;
}

.settings-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.settings-about p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.settings-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.settings-features li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.settings-features li:last-child {
    border-bottom: none;
}

.settings-features li i {
    width: 20px;
    color: var(--primary-color);
}

.settings-status {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.status-label {
    font-weight: 500;
    color: var(--text-primary);
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.connected {
    background-color: #dcfce7;
    color: #16a34a;
}

.status-badge.disconnected {
    background-color: #fee2e2;
    color: #dc2626;
}

/* ==========================================
   Call Center Module Styles
   ========================================== */

.call-center-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 1.5rem;
    background-color: var(--bg-primary);
}

.call-center-header {
    margin-bottom: 1.5rem;
}

.call-center-header h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.dialer-section {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.dialer-controls {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.dialer-input-group,
.dialer-template-group {
    flex: 1;
    min-width: 200px;
}

.dialer-input-group label,
.dialer-template-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.dialer-input {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
}

.dialer-buttons {
    display: flex;
    gap: 0.5rem;
}

.dialer-buttons .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Call Status Banner */
.call-status-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--border-color);
}

.call-status-indicator {
    font-size: 0.75rem;
}

.call-status-indicator.idle {
    color: var(--text-muted);
}

.call-status-indicator.dialing {
    color: #f59e0b;
    animation: pulse 1s infinite;
}

.call-status-indicator.connected {
    color: #10b981;
}

.call-status-indicator.ended {
    color: #6b7280;
}

.call-status-indicator.preparing {
    color: #3b82f6;
    animation: pulse 1.5s infinite;
}

.call-status-text {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
}

.call-duration {
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    background-color: var(--bg-tertiary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Call Center Content Grid */
.call-center-content-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    overflow: hidden;
}

.call-center-steps-section,
.call-center-log-section {
    display: flex;
    flex-direction: column;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.call-center-steps-list,
.call-center-log {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.call-center-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
}

.call-center-empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

/* Call Center Step Item */
.call-center-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    border-left: 4px solid var(--border-color);
    background-color: var(--bg-primary);
    transition: all var(--transition-fast);
}

.call-center-step.insurance {
    border-left-color: var(--primary-color);
}

.call-center-step.provider {
    border-left-color: #10b981;
}

.call-center-step.active {
    background-color: #fffbeb;
    border-left-color: #f59e0b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.call-center-step.completed {
    opacity: 0.6;
}

.call-center-step-index {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.call-center-step.active .call-center-step-index {
    background-color: #f59e0b;
    color: white;
}

.call-center-step.completed .call-center-step-index {
    background-color: #10b981;
    color: white;
}

.call-center-step-content {
    flex: 1;
}

.call-center-step-role {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.call-center-step.insurance .call-center-step-role {
    color: var(--primary-color);
}

.call-center-step.provider .call-center-step-role {
    color: #10b981;
}

.call-center-step-text {
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.5;
}

/* Call Center Log Entries */
.call-center-log-entry {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--border-color);
    background-color: var(--bg-primary);
}

.call-center-log-entry.insurance {
    border-left-color: var(--primary-color);
    background-color: #eff6ff;
}

.call-center-log-entry.provider {
    border-left-color: #10b981;
    background-color: #ecfdf5;
}

.call-center-log-entry.system {
    border-left-color: #f59e0b;
    background-color: #fef3c7;
    font-style: italic;
}

.call-center-log-role {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
    color: var(--text-muted);
}

.call-center-log-text {
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 1024px) {
    .call-center-content-grid {
        grid-template-columns: 1fr;
    }
    
    .dialer-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .dialer-buttons {
        justify-content: center;
    }
}

/* ============================================================================
   Claim Management Module Styles
   ============================================================================ */

.claim-management-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 1.5rem;
}

.claim-management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.claim-management-title h1 {
    font-size: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.claim-management-title h1 i {
    color: var(--primary-color);
}

.claims-count {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.claim-management-actions {
    display: flex;
    gap: 0.75rem;
}

/* Claims Upload Dropzone */
.claims-upload-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3rem;
    text-align: center;
    background-color: var(--bg-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.claims-upload-dropzone:hover {
    border-color: var(--primary-color);
    background-color: #eff6ff;
}

.claims-upload-dropzone.dragover {
    border-color: var(--primary-color);
    background-color: #dbeafe;
}

.claims-upload-dropzone i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.claims-upload-dropzone p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.claims-upload-dropzone small {
    color: var(--text-muted);
}

/* Claims Table Container */
.claims-table-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Claims Filter Bar */
.claims-filter-bar {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.claims-search {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0 0.75rem;
}

.claims-search i {
    color: var(--text-muted);
}

.claims-search input {
    border: none;
    background: none;
    padding: 0.5rem 0;
    flex: 1;
    font-size: 0.875rem;
}

.claims-search input:focus {
    outline: none;
}

.claims-filters {
    display: flex;
    gap: 0.5rem;
}

.claims-filters select {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    min-width: 140px;
}

.claims-pagination-info {
    font-size: 0.875rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Claims List (Card View) */
.claims-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
}

/* Individual Claim Card */
.claim-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.claim-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

/* Card Header */
.claim-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.claim-card-patient {
    flex: 1;
}

.claim-card-patient-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.claim-card-patient-id {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.claim-card-patient-id strong {
    color: #6366f1;
    font-weight: 600;
}

.claim-card-status-amount {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.claim-card-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: #059669;
}

/* Card Body - Details Grid */
.claim-card-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.claim-card-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.claim-card-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.claim-card-value {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

.claim-card-value.empty {
    color: var(--text-muted);
    font-style: italic;
}

/* Card Footer */
.claim-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.claim-card-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.claim-card-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.claim-card-meta-item i {
    color: #6366f1;
    width: 14px;
}

.claim-card-meta-item strong {
    color: var(--text-primary);
    font-weight: 600;
}

.claim-card-actions {
    display: flex;
    gap: 0.5rem;
}

.claim-card-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* Provider Info in Card */
.claim-card-provider-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-top: 0.5rem;
}

.claim-card-provider-item {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.claim-card-provider-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #8b5cf6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.claim-card-provider-value {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Empty State */
.claims-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-muted);
    text-align: center;
}

.claims-empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Status Badge */
.claim-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

.claim-status-badge.pending {
    background-color: #fef3c7;
    color: #92400e;
}

.claim-status-badge.called {
    background-color: #dbeafe;
    color: #1e40af;
}

.claim-status-badge.resolved {
    background-color: #d1fae5;
    color: #065f46;
}

/* Pagination */
.claims-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.pagination-pages {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Claim Detail Modal - Maximized */
.modal-xl {
    max-width: 98vw;
    width: 98vw;
    height: 95vh;
    max-height: 95vh;
}

.claim-detail-body {
    height: calc(95vh - 160px);
    max-height: calc(95vh - 160px);
    overflow-y: auto;
    padding: 0.5rem 0.75rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.5rem;
    align-content: start;
}

/* Full-width sections span all columns */
.claim-detail-body > .claim-detail-workflow-section,
.claim-detail-body > .quick-phrases-horizontal-section {
    grid-column: 1 / -1;
}

.claim-detail-section {
    margin-bottom: 0.25rem;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
}

.claim-detail-section:last-child {
    margin-bottom: 0;
}

.claim-detail-section h4 {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    padding-bottom: 0.2rem;
    border-bottom: 2px solid var(--primary-color);
    cursor: pointer;
    user-select: none;
}

.claim-detail-section h4 i {
    color: var(--primary-color);
}

.claim-detail-section h4 .section-toggle {
    margin-left: auto;
    font-size: 0.65rem;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.claim-detail-section.collapsed .claim-detail-grid {
    display: none;
}

.claim-detail-section.collapsed h4 .section-toggle {
    transform: rotate(-90deg);
}

.claim-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 0.35rem;
}

/* Additional Fields section */
#claimOtherFieldsSection .claim-detail-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.3rem;
}

#claimOtherFieldsSection .claim-field {
    padding: 0.2rem 0.4rem;
    background: #f9fafb;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
}

#claimOtherFieldsSection .claim-field-label {
    font-size: 0.55rem;
}

#claimOtherFieldsSection .claim-field-value {
    font-size: 0.75rem;
}

.claim-field {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    position: relative;
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
    transition: background-color 0.15s;
}

.claim-field:hover {
    background-color: #f8fafc;
}

.claim-field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 20px;
}

.claim-field-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.claim-field-controls {
    display: flex;
    align-items: center;
    gap: 1px;
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
}

.claim-field:hover .claim-field-controls {
    opacity: 1;
    pointer-events: auto;
}

/* In active call view, always show variable controls (flags) */
.claim-var-controls {
    display: flex;
    align-items: center;
    gap: 1px;
}


.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.no-results i {
    font-size: 36px;
    margin-bottom: 10px;
    color: #9ca3af;
}

.no-results h3 {
    margin: 8px 0;
    font-weight: 600;
}


.other-fields-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.add-other-field-btn {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
}

.add-other-field-btn:hover {
    background: #1d4ed8;
}

/* --- Edit / Delete buttons (Additional Fields only) --- */

.claim-field-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Base style */
.claim-field-edit-btn,
.claim-field-delete-btn {
    background: transparent;
    border: none;
    padding: 4px;
    border-radius: 6px;
    cursor: pointer;
    color: #9ca3af; /* soft gray */
    font-size: 13px;
    opacity: 0.6;
    transition: all 0.15s ease-in-out;
}

/* Show on hover of the field */
.claim-field:hover .claim-field-edit-btn,
.claim-field:hover .claim-field-delete-btn {
    opacity: 1;
}

/* Hover effect */
.claim-field-edit-btn:hover {
    background: #e0e7ff;
    color: #4338ca; /* indigo */
}

.claim-field-delete-btn:hover {
    background: #fee2e2;
    color: #b91c1c; /* red */
}

.claim-field-edit-btn,
.claim-field-delete-btn {
    opacity: 0;
}

.claim-field:hover .claim-field-edit-btn,
.claim-field:hover .claim-field-delete-btn {
    opacity: 1;
}

.claim-field-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.claim-field-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
}

.claim-field-controls {
    gap: 2px;
}

.claim-field-controls::before {
    display: none;
}

/* ===== Field action icons (Edit / Delete) ===== */

.field-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.field-action-btn {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: none;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.field-action-btn i {
    font-size: 11px;
}

.field-action-btn:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.field-action-btn.danger:hover {
    background-color: #fee2e2;
    color: #b91c1c;
}

/* Remove default button styles */
.field-action-btn:focus {
    outline: none;
    box-shadow: none;
}



/* Digit-by-digit toggle button */
.digit-toggle-btn {
    background: none;
    border: none;
    color: #d1d5db;
    cursor: pointer;
    padding: 1px 2px;
    font-size: 0.55rem;
    transition: all 0.2s;
    border-radius: 3px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.digit-toggle-btn:hover {
    background-color: #e5e7eb;
    color: #6b7280;
}

.digit-toggle-btn.active {
    background-color: #dbeafe;
    color: #2563eb;
}

.digit-toggle-btn.active:hover {
    background-color: #bfdbfe;
}

.digit-toggle-btn i {
    font-size: 0.5rem;
}

/* Date format toggle button (orange/amber color) */
.date-toggle-btn {
    background: none;
    border: none;
    color: #d1d5db;
    cursor: pointer;
    padding: 1px 2px;
    font-size: 0.55rem;
    transition: all 0.2s;
    border-radius: 3px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.date-toggle-btn:hover {
    background-color: #fef3c7;
    color: #d97706;
}

.date-toggle-btn.active {
    background-color: #fef3c7;
    color: #d97706;
}

.date-toggle-btn.active:hover {
    background-color: #fde68a;
}

.date-toggle-btn i {
    font-size: 0.5rem;
}

/* Dollar format toggle button (green color) */
.dollar-toggle-btn {
    background: none;
    border: none;
    color: #d1d5db;
    cursor: pointer;
    padding: 1px 2px;
    font-size: 0.55rem;
    transition: all 0.2s;
    border-radius: 3px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dollar-toggle-btn:hover {
    background-color: #dcfce7;
    color: #16a34a;
}

.dollar-toggle-btn.active {
    background-color: #dcfce7;
    color: #16a34a;
}

.dollar-toggle-btn.active:hover {
    background-color: #bbf7d0;
}

.dollar-toggle-btn i {
    font-size: 0.5rem;
}

/* Code format toggle button (purple color) */
.code-toggle-btn {
    background: none;
    border: none;
    color: #d1d5db;
    cursor: pointer;
    padding: 1px 2px;
    font-size: 0.55rem;
    transition: all 0.2s;
    border-radius: 3px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.code-toggle-btn:hover {
    background-color: #f3e8ff;
    color: #9333ea;
}

.code-toggle-btn.active {
    background-color: #f3e8ff;
    color: #9333ea;
}

.code-toggle-btn.active:hover {
    background-color: #e9d5ff;
}

.code-toggle-btn i {
    font-size: 0.5rem;
}

/* Digits only toggle button (teal/cyan color) - strips alpha, keeps only numbers */
.digits-only-toggle-btn {
    background: none;
    border: none;
    color: #d1d5db;
    cursor: pointer;
    padding: 1px 2px;
    font-size: 0.55rem;
    transition: all 0.2s;
    border-radius: 3px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.digits-only-toggle-btn:hover {
    background-color: #cffafe;
    color: #0891b2;
}

.digits-only-toggle-btn.active {
    background-color: #cffafe;
    color: #0891b2;
}

.digits-only-toggle-btn.active:hover {
    background-color: #a5f3fc;
}

.digits-only-toggle-btn i {
    font-size: 0.5rem;
}

/* Digit-mode display styling */
.claim-field-value.digit-mode,
.claim-var-value.digit-mode {
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 1px;
    background-color: #f0fdf4;
    border: 1px dashed #22c55e;
    color: #166534;
}

/* Date-mode display styling */
.claim-field-value.date-mode,
.claim-var-value.date-mode {
    background-color: #fffbeb;
    border: 1px dashed #f59e0b;
    color: #92400e;
    font-style: italic;
}

/* Dollar-mode display styling */
.claim-field-value.dollar-mode,
.claim-var-value.dollar-mode {
    background-color: #dcfce7;
    border: 1px dashed #16a34a;
    color: #166534;
}

/* Code-mode display styling */
.claim-field-value.code-mode,
.claim-var-value.code-mode {
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 2px;
    background-color: #f3e8ff;
    border: 1px dashed #9333ea;
    color: #6b21a8;
}

/* Digits-only-mode display styling (teal/cyan) */
.claim-field-value.digits-only-mode,
.claim-var-value.digits-only-mode {
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 3px;
    background-color: #cffafe;
    border: 1px dashed #0891b2;
    color: #0e7490;
}

.claim-field-info-btn {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 1px 2px;
    font-size: 0.6rem;
    transition: color 0.2s;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.claim-field-info-btn:hover,
.claim-field-info-btn.active {
    color: #6366f1;
}

.claim-field-value {
    font-size: 0.8rem;
    color: var(--text-primary);
    padding: 0.25rem 0.4rem;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-sm);
    line-height: 1.2;
    word-break: break-word;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.claim-field-value:hover {
    background-color: #e0e7ff;
    border-color: #6366f1;
}

.claim-field-value.highlight,
.claim-field-value.speaking {
    background-color: #fef08a;
    border-color: #eab308;
    animation: highlightPulse 0.5s ease;
}

@keyframes highlightPulse {
    0%, 100% { background-color: #fef08a; }
    50% { background-color: #fde047; }
}

/* Sample Questions Panel */
.claim-field-questions {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, #ede9fe 0%, #e0e7ff 100%);
    border-radius: 8px;
    border-left: 3px solid #6366f1;
    font-size: 0.8rem;
}

.claim-field-questions .questions-header {
    font-weight: 600;
    color: #4f46e5;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.claim-field-questions .questions-list {
    margin: 0;
    padding-left: 1rem;
    list-style: none;
}

.claim-field-questions .questions-list li {
    color: #4b5563;
    font-style: italic;
    padding: 0.25rem 0;
    position: relative;
}

.claim-field-questions .questions-list li::before {
    content: "•";
    position: absolute;
    left: -0.75rem;
    color: #6366f1;
}

.claim-field-questions .no-questions {
    color: var(--text-muted);
    font-style: italic;
    margin: 0;
}

/* Claim Detail Footer - Always Visible */
.claim-detail-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.claim-proprietary-footer {
    width: 100%;
    text-align: center;
    font-size: 0.65rem;
    color: var(--text-muted);
    padding-top: 0.4rem;
    border-top: 1px solid var(--border-color);
    letter-spacing: 0.02em;
}

.claim-call-section {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.claim-phone-input-group,
.claim-template-select-group,
.claim-voice-select-group {
    flex: 1;
}

.claim-phone-input-group label,
.claim-template-select-group label,
.claim-voice-select-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.claim-phone-input-group input,
.claim-template-select-group select,
.claim-voice-select-group select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

.claim-detail-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Speaking word highlight */
.speaking-word {
    background-color: #fde047;
    padding: 0.1rem 0.2rem;
    border-radius: 2px;
    transition: background-color 0.2s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .claim-management-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .claim-management-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .claims-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .claims-filters {
        flex-direction: column;
    }
    
    .claim-detail-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .claim-call-section {
        flex-direction: column;
    }
}

/* ============================================================================
   Call Center Claim Panel - Shows active claim data during calls
   ============================================================================ */

.call-center-claim-panel {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    overflow: hidden;
}

.claim-panel-header {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1rem;
}

.claim-panel-header h3 {
    margin: 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.claim-panel-content {
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
}

.cc-claim-field {
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.25rem;
    background-color: var(--bg-primary);
    transition: all 0.3s ease;
}

.cc-claim-field.speaking {
    background-color: #fef08a;
    border-left: 4px solid #eab308;
    animation: speakingPulse 1s ease-in-out infinite;
}

@keyframes speakingPulse {
    0%, 100% { background-color: #fef08a; }
    50% { background-color: #fde047; }
}

.cc-claim-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.cc-claim-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Auto-detected field highlight in modal */
.claim-field-value.auto-speaking {
    background-color: #bbf7d0;
    border: 2px solid #22c55e;
    animation: autoSpeakPulse 1s ease-in-out infinite;
}

@keyframes autoSpeakPulse {
    0%, 100% { background-color: #bbf7d0; border-color: #22c55e; }
    50% { background-color: #86efac; border-color: #16a34a; }
}

/* ============================================================================
   In-Modal Call Interface - Calling directly from Claim Details
   ============================================================================ */

.claim-call-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    padding: 0.75rem 1rem;
    flex-shrink: 0;
}

.call-header-info h3 {
    margin: 0 0 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.call-header-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    opacity: 0.9;
}

.call-header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.call-timer {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: monospace;
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.claim-call-body {
    padding: 0;
    height: calc(95vh - 80px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.claim-call-status-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.claim-call-status-banner .call-status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.claim-call-status-banner .call-status-indicator.connecting {
    background-color: #f59e0b;
    animation: pulse 1.5s ease-in-out infinite;
}

.claim-call-status-banner .call-status-indicator.connected {
    background-color: #22c55e;
    animation: pulse 2s ease-in-out infinite;
}

.claim-call-status-banner .call-status-indicator.ended {
    background-color: #ef4444;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* Live Streaming Toggle */
.live-streaming-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    padding: 0.25rem 0.5rem;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d4a6f 100%);
    border-radius: 20px;
    border: 1px solid #3d5a7f;
}

.streaming-toggle {
    position: relative;
    width: 36px;
    height: 20px;
    cursor: pointer;
}

.streaming-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.streaming-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #4a5568;
    transition: 0.3s;
    border-radius: 20px;
}

.streaming-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.streaming-toggle input:checked + .streaming-slider {
    background-color: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.streaming-toggle input:checked + .streaming-slider:before {
    transform: translateX(16px);
}

.streaming-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.streaming-label i {
    font-size: 0.85rem;
}

.live-streaming-control:has(input:checked) .streaming-label {
    color: #10b981;
}

.streaming-status {
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    font-weight: 600;
}

.streaming-status.active {
    background-color: #10b981;
    color: white;
    animation: streamingPulse 2s ease-in-out infinite;
}

.streaming-status.connecting {
    background-color: #f59e0b;
    color: white;
}

@keyframes streamingPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* DTMF Dial Pad Control */
.dtmf-control {
    margin-right: 1rem;
}

.dtmf-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.6rem;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border: none;
    color: white;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dtmf-toggle-btn:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    transform: translateY(-1px);
}

/* DTMF Dial Pad Modal - Light Theme, Draggable */
.dtmf-pad-modal {
    position: fixed;
    top: 120px;
    right: 20px;
    z-index: 10001;
    animation: floatingPanelIn 0.2s ease;
}

/* Draggable Floating Panel Base Styles */
.floating-panel {
    position: fixed;
    z-index: 10001;
    animation: floatingPanelIn 0.2s ease;
}

@keyframes floatingPanelIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Generic Floating Panel Container */
.floating-panel-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    min-width: 320px;
    max-width: 450px;
}

.floating-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px 12px 0 0;
    cursor: grab;
    user-select: none;
}

.floating-panel-header:active {
    cursor: grabbing;
}

.floating-panel-header h4 {
    margin: 0;
    color: #1e293b;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.floating-panel-header h4 i {
    color: #6366f1;
}

.floating-panel-close-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #64748b;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

.floating-panel-close-btn:hover {
    background: #fee2e2;
    border-color: #fecaca;
    color: #ef4444;
}

.floating-panel-body {
    padding: 1rem;
}

.floating-panel-body .form-group {
    margin-bottom: 0;
}

.floating-panel-body label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 0.5rem;
}

.floating-panel-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 12px 12px;
}

/* Dragging state for all floating panels */
.floating-panel.dragging {
    opacity: 0.9;
}

.floating-panel.dragging .floating-panel-header,
.floating-panel.dragging .dtmf-pad-header {
    cursor: grabbing;
}

.dtmf-pad-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    min-width: 280px;
}

.dtmf-pad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    cursor: grab;
    user-select: none;
}

.dtmf-pad-header:active {
    cursor: grabbing;
}

.dtmf-pad-header h4 {
    margin: 0;
    color: #1e293b;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dtmf-pad-header h4 i {
    color: #6366f1;
}

/* Drag handle indicator */
.drag-handle {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #94a3b8;
    font-size: 0.7rem;
    margin-left: 0.5rem;
}

.drag-handle i {
    font-size: 0.8rem;
}

.dtmf-close-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #64748b;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.dtmf-close-btn:hover {
    background: #fee2e2;
    border-color: #fecaca;
    color: #ef4444;
}

.dtmf-display {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.dtmf-input {
    flex: 1;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: #059669;
    font-size: 1.25rem;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.2em;
    text-align: center;
    font-weight: 600;
}

.dtmf-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.dtmf-input::placeholder {
    color: #94a3b8;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    font-weight: 400;
}

.dtmf-clear-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #64748b;
    width: 44px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dtmf-clear-btn:hover {
    background: #fee2e2;
    border-color: #fecaca;
    color: #ef4444;
}

.dtmf-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.dtmf-btn {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.85rem;
    color: #1e293b;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 56px;
}

.dtmf-btn span {
    font-size: 0.55rem;
    color: #94a3b8;
    margin-top: 1px;
    letter-spacing: 0.1em;
    font-weight: 500;
}

.dtmf-btn:hover {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border-color: #6366f1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.dtmf-btn:active {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    transform: translateY(0);
}

.dtmf-btn:active span {
    color: rgba(255, 255, 255, 0.7);
}

.dtmf-btn.dtmf-special {
    color: #6366f1;
    font-size: 1.6rem;
}

.dtmf-btn.dtmf-special:active {
    color: white;
}

.dtmf-actions {
    margin-bottom: 0.75rem;
}

.dtmf-send-btn {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.dtmf-hint {
    margin: 0;
    text-align: center;
    font-size: 0.7rem;
    color: #94a3b8;
}

/* Dragging state */
.dtmf-pad-modal.dragging {
    opacity: 0.9;
    cursor: grabbing;
}

.dtmf-pad-modal.dragging .dtmf-pad-header {
    cursor: grabbing;
}

.claim-call-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background-color: var(--border-color);
    flex: 1;
    overflow: hidden;
}

.claim-call-variables-section,
.claim-call-transcript-section {
    background-color: var(--bg-primary);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.claim-call-variables-section .section-header,
.claim-call-transcript-section .section-header {
    padding: 0.35rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    flex-shrink: 0;
}

.claim-call-variables-section .section-header h2,
.claim-call-transcript-section .section-header h2 {
    font-size: 0.9rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-primary);
}

.section-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

.auto-detect-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #22c55e;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.claim-call-variables-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 2px;
    align-content: start;
}

/* Variable Items (Clickable) */
.claim-var-item {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 0.2rem 0.35rem;
    border-radius: 4px;
    margin-bottom: 0;
    background-color: var(--bg-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.claim-var-item:hover {
    background-color: #e0e7ff;
    border-color: #6366f1;
}

.claim-var-item.speaking {
    background-color: #fef08a;
    border-color: #eab308;
    animation: speakingPulse 1s ease-in-out infinite;
}

.claim-var-item.queued {
    background-color: #e0e7ff;
    border-color: #6366f1;
    animation: queuedPulse 2s ease-in-out infinite;
}

@keyframes queuedPulse {
    0%, 100% { background-color: #e0e7ff; border-color: #6366f1; }
    50% { background-color: #c7d2fe; border-color: #4f46e5; }
}

.claim-var-item.auto-detected {
    background-color: #bbf7d0;
    border-color: #22c55e;
}

.claim-var-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 0;
}

.claim-var-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.claim-var-info-btn {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 1px;
    font-size: 0.6rem;
    transition: color 0.2s;
}

.claim-var-info-btn:hover,
.claim-var-info-btn.active {
    color: #6366f1;
}

.claim-var-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0;
    line-height: 1.15;
    word-break: break-word;
}

/* Variable Questions Panel */
.claim-var-questions {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: linear-gradient(135deg, #ede9fe 0%, #e0e7ff 100%);
    border-radius: 6px;
    border-left: 2px solid #6366f1;
    font-size: 0.75rem;
}

.claim-var-questions .var-questions-header {
    font-weight: 600;
    color: #4f46e5;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
}

.claim-var-questions .var-questions-list {
    margin: 0;
    padding-left: 0.75rem;
    list-style: none;
}

.claim-var-questions .var-questions-list li {
    color: #4b5563;
    font-style: italic;
    padding: 0.125rem 0;
    position: relative;
    font-size: 0.7rem;
}

.claim-var-questions .var-questions-list li::before {
    content: "•";
    position: absolute;
    left: -0.5rem;
    color: #6366f1;
}

.claim-var-questions .no-questions {
    color: #22c55e;
    font-style: italic;
    margin: 0;
    font-size: 0.7rem;
}

/* ============================================
   Canonical IVR/AVR Phrases Section
   ============================================ */

.canonical-phrases-section {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.15);
}

.canonical-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.canonical-header:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

.canonical-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.canonical-header-left i {
    font-size: 1.5rem;
    color: white;
}

.canonical-header-left h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.canonical-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.canonical-badge {
    background: rgba(255,255,255,0.25);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.canonical-toggle-icon {
    color: white;
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.canonical-toggle-icon.collapsed {
    transform: rotate(-90deg);
}

.canonical-content {
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.canonical-content.collapsed {
    display: none;
}

/* Canonical Steps */
.canonical-step {
    background: white;
    border-radius: 6px;
    padding: 0.5rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.canonical-step:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-color: #d1d5db;
}

.canonical-step-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-title {
    font-weight: 600;
    color: #374151;
    flex: 1;
}

.speak-canonical-btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.speak-canonical-btn:hover {
    opacity: 1;
}

/* Phrase Boxes */
.canonical-phrase-box {
    padding: 0.5rem;
    border-radius: 6px;
    border-left: 3px solid;
}

.canonical-phrase-box.insurance-says {
    background: linear-gradient(135deg, #ede9fe 0%, #e0e7ff 100%);
    border-left-color: #6366f1;
}

.canonical-phrase-box.provider-says {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-left-color: #10b981;
}

.canonical-phrase-box.warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left-color: #f59e0b;
}

.phrase-speaker {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.canonical-phrase-box.insurance-says .phrase-speaker {
    color: #4f46e5;
}

.canonical-phrase-box.provider-says .phrase-speaker {
    color: #059669;
}

.canonical-phrase {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #374151;
}

.canonical-phrase strong {
    color: #1f2937;
    background: rgba(255,255,255,0.6);
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
}

.canonical-keyword {
    font-size: 1.25rem;
    font-weight: 700;
    color: #059669;
    text-align: center;
    padding: 0.5rem;
    background: rgba(255,255,255,0.5);
    border-radius: 6px;
}

.canonical-note {
    margin: 0.75rem 0 0 0;
    font-size: 0.8rem;
    color: #6b7280;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.canonical-note i {
    color: #9ca3af;
}

/* Routing Logic */
.canonical-routing-logic {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    padding: 1rem;
}

.routing-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.routing-header i {
    color: #6366f1;
}

.routing-rules {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.routing-rule {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.routing-rule.success {
    background: #d1fae5;
    color: #065f46;
}

.routing-rule.success i {
    color: #10b981;
}

.routing-rule.default {
    background: #f3f4f6;
    color: #4b5563;
}

.routing-rule.default i {
    color: #9ca3af;
}

.routing-arrow {
    color: #9ca3af;
    margin: 0 0.25rem;
}

.routing-action {
    font-weight: 600;
}

/* Quick Reference */
.canonical-quick-ref {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 1px solid #60a5fa;
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.quick-ref-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 0.5rem;
}

.quick-ref-title i {
    color: #3b82f6;
}

.quick-ref-phrase {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: #1e3a8a;
    font-style: italic;
}

.quick-ref-phrase .btn-outline {
    border-color: #60a5fa;
    color: #2563eb;
}

.quick-ref-phrase .btn-outline:hover {
    background: #2563eb;
    color: white;
}

/* Design Notes */
.canonical-design-notes {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.design-notes-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.design-notes-header:hover {
    background: #f3f4f6;
}

.design-notes-header i:first-child {
    color: #fbbf24;
}

.design-notes-toggle {
    margin-left: auto;
    font-size: 0.85rem;
    transition: transform 0.3s ease;
}

.design-notes-toggle.collapsed {
    transform: rotate(-90deg);
}

.design-notes-list {
    margin: 0;
    padding: 0 1rem 1rem 2.5rem;
    list-style: none;
}

.design-notes-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.35rem 0;
    font-size: 0.85rem;
    color: #4b5563;
}

.design-notes-list li i {
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.design-notes-list li i.fa-check {
    color: #10b981;
}

.design-notes-list li i.fa-info-circle {
    color: #3b82f6;
}

/* Canonical Section in Call Center View */
.call-center-canonical {
    margin: 0 1.5rem 1.5rem 1.5rem;
}

/* Canonical Section in Claim Detail Modal */
.claim-detail-body > .canonical-phrases-section {
    margin-bottom: 1.5rem;
}

/* Canonical Step Speaking State */
.canonical-step.speaking {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3), 0 4px 8px rgba(0,0,0,0.1);
    animation: canonical-pulse 1.5s ease-in-out infinite;
}

@keyframes canonical-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3), 0 4px 8px rgba(0,0,0,0.1); }
    50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.2), 0 4px 12px rgba(0,0,0,0.15); }
}

/* Responsive Canonical Section */
@media (max-width: 768px) {
    .canonical-header {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .canonical-header-left {
        justify-content: center;
    }

    .canonical-badge {
        font-size: 0.7rem;
    }

    .canonical-step-header {
        flex-wrap: wrap;
    }

    .routing-rule {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .routing-arrow {
        display: none;
    }

    .quick-ref-phrase {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================
   Confirmation Phrases Section
   ============================================ */

.confirmation-phrases-section {
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
    border: 2px solid #f97316;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(249, 115, 22, 0.15);
}

.confirmation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.confirmation-header:hover {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
}

.confirmation-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.confirmation-header-left i {
    font-size: 1.25rem;
    color: white;
}

.confirmation-header-left h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.confirmation-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.confirmation-badge {
    background: rgba(255,255,255,0.25);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.confirmation-toggle-icon {
    color: white;
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.confirmation-toggle-icon.collapsed {
    transform: rotate(-90deg);
}

.confirmation-content {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: 300px;
    overflow: hidden;
}

.confirmation-content.collapsed {
    display: none;
}

.confirmation-content .live-speak-section {
    padding: 0.5rem 0.75rem;
    background: #fef3c7;
    border-bottom: 1px solid #fed7aa;
    position: sticky;
    top: 0;
    z-index: 5;
    flex-shrink: 0;
}

.confirmation-content .live-speak-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.confirmation-content .live-speak-input {
    flex: 1;
    padding: 0.4rem 0.6rem;
    border: 1px solid #fdba74;
    border-radius: 4px;
    font-size: 0.85rem;
}

.confirmation-content .live-speak-input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.confirmation-scrollable {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Quick Phrases */
.confirmation-quick-phrases {
    background: white;
    border-radius: 6px;
    padding: 0.75rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    border: 1px solid #fed7aa;
}

.confirmation-hint {
    font-size: 0.75rem;
    color: #9a3412;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-phrase-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.quick-phrase-btn {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 1px solid #fdba74;
    color: #9a3412;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.quick-phrase-btn:hover {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    border-color: #ea580c;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(249, 115, 22, 0.3);
}

.quick-phrase-btn.speaking {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-color: #059669;
    animation: phrase-pulse 1s ease-in-out infinite;
}

.quick-phrase-btn .remove-phrase {
    margin-left: 0.25rem;
    opacity: 0.6;
    font-size: 0.7rem;
}

.quick-phrase-btn .remove-phrase:hover {
    opacity: 1;
    color: #dc2626;
}

@keyframes phrase-pulse {
    0%, 100% { box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.2); }
}

/* Phrase Categories */
.confirmation-categories {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.phrase-category {
    background: white;
    border-radius: 6px;
    border: 1px solid #fed7aa;
    overflow: hidden;
}

.phrase-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
    cursor: pointer;
}

.phrase-category-header:hover {
    background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
}

.phrase-category-title {
    font-weight: 600;
    color: #9a3412;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.phrase-category-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.phrase-category-random {
    background: #f97316;
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.phrase-category-random:hover {
    background: #ea580c;
}

.phrase-category-toggle {
    color: #9a3412;
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.phrase-category-toggle.collapsed {
    transform: rotate(-90deg);
}

.phrase-category-content {
    padding: 0.5rem 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.phrase-category-content.collapsed {
    display: none;
}

.phrase-variation {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.phrase-variation:hover {
    background: #f97316;
    color: white;
    border-color: #f97316;
}

.phrase-variation.speaking {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

/* Add Phrase Section */
.add-phrase-section {
    background: #fffbeb;
    border: 1px dashed #f59e0b;
    border-radius: 6px;
    padding: 0.75rem;
}

.add-phrase-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #92400e;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.add-phrase-row {
    display: flex;
    gap: 0.5rem;
}

.add-phrase-row .form-input {
    flex: 1;
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
}

/* Add Category Section */
.add-category-section {
    margin-top: 0.75rem;
    border-top: 1px solid #fcd34d;
    padding-top: 0.75rem;
}

.add-category-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #92400e;
    cursor: pointer;
    user-select: none;
}

.add-category-header:hover {
    color: #78350f;
}

.add-category-form {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.add-category-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.add-category-form label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #78350f;
}

.add-category-form .form-input,
.add-category-form .form-textarea {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    border: 1px solid #fcd34d;
    border-radius: 4px;
}

.add-category-form .form-textarea {
    resize: vertical;
    min-height: 60px;
}

/* Responsive */
@media (max-width: 768px) {
    .confirmation-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .confirmation-header-left {
        justify-content: center;
    }

    .quick-phrase-grid {
        justify-content: center;
    }

    .phrase-category-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/* Call Center Confirmation Section (Always Visible) */
.call-center-confirmation {
    margin: 0 1.5rem 1.5rem 1.5rem;
}

.call-center-confirmation .confirmation-header {
    cursor: default;
}

.call-center-confirmation .confirmation-header:hover {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

/* Claim Detail Confirmation Section */
.claim-detail-confirmation {
    margin-bottom: 1rem;
}

.claim-detail-confirmation .confirmation-header {
    cursor: default;
}

.claim-detail-confirmation .confirmation-header:hover {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

/* Custom Canonical Workflow Section */
.add-canonical-workflow {
    margin-top: 1rem;
    background: #fffbeb;
    border: 1px dashed #f59e0b;
    border-radius: 6px;
    padding: 0.75rem;
}

.add-workflow-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #92400e;
    font-size: 0.85rem;
    cursor: pointer;
    user-select: none;
}

.add-workflow-header:hover {
    color: #78350f;
}

.add-workflow-header i:last-child {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.add-workflow-form {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.add-workflow-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.add-workflow-form label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #78350f;
}

.add-workflow-form .form-input,
.add-workflow-form .form-textarea {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    border: 1px solid #fcd34d;
    border-radius: 4px;
}

/* Custom Canonical Workflows List */
.custom-canonical-workflows {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.custom-canonical-workflow {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px solid #10b981;
    border-radius: 8px;
    overflow: hidden;
}

.custom-workflow-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.workflow-name {
    font-weight: 700;
    color: white;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.workflow-actions {
    display: flex;
    gap: 0.5rem;
}

.custom-workflow-content {
    padding: 0.75rem;
}

.workflow-prompt,
.workflow-response {
    margin-bottom: 0.5rem;
}

.workflow-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #065f46;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.25rem;
}

.workflow-prompt p,
.workflow-response p {
    margin: 0;
    font-size: 0.85rem;
    color: #064e3b;
    font-style: italic;
}

.canonical-response-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.canonical-response-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

/* Custom Workflow as Expandable Section */
.custom-canonical-workflows-container {
    margin: 0 1.5rem 0.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.custom-workflow-section {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px solid #10b981;
}

.custom-workflow-section .canonical-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.custom-workflow-section .canonical-header:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.custom-workflow-section .custom-badge {
    background: rgba(255,255,255,0.3);
    font-weight: 700;
}

/* Built-in Workflow Styling */
.custom-workflow-section.builtin-workflow {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 2px solid #3b82f6;
}

.custom-workflow-section.builtin-workflow .canonical-header {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.custom-workflow-section.builtin-workflow .canonical-header:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.custom-workflow-section.builtin-workflow .builtin-badge {
    background: rgba(255,255,255,0.3);
    font-weight: 700;
}

.builtin-label {
    background: rgba(255,255,255,0.25);
    color: white;
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.workflow-delete-btn {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.7rem !important;
}

/* Add Workflow Button Container */
.add-workflow-button-container {
    margin: 0 1.5rem 1rem 1.5rem;
    display: flex;
    justify-content: center;
}

.add-workflow-button-container.compact {
    margin: 0.5rem 0;
}

.add-workflow-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: 2px dashed #b45309;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-workflow-btn:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
}

.add-workflow-btn i {
    font-size: 1.1rem;
}

/* Add Workflow Form Container */
.add-workflow-form-container {
    margin: 0 1.5rem 1rem 1.5rem;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 2px solid #f59e0b;
    border-radius: 8px;
    overflow: hidden;
}

.add-workflow-form-inner {
    padding: 1rem;
}

.add-workflow-form-inner .form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #fcd34d;
}

.add-workflow-form-inner .form-header h4 {
    margin: 0;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-workflow-form-inner .form-group {
    margin-bottom: 0.75rem;
}

.add-workflow-form-inner label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #78350f;
    margin-bottom: 0.25rem;
}

.add-workflow-form-inner .form-input,
.add-workflow-form-inner .form-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #fcd34d;
    border-radius: 4px;
    font-size: 0.9rem;
}

.add-workflow-form-inner .btn-success {
    width: 100%;
    margin-top: 0.5rem;
}

/* Quick Phrase Header with Inline Add */
.quick-phrase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.add-phrase-inline {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.form-input-sm {
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
    border: 1px solid #fdba74;
    border-radius: 4px;
    width: 140px;
}

.add-phrase-btn {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-phrase-btn:hover {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    transform: scale(1.1);
}

.add-phrase-btn i {
    font-size: 0.8rem;
}

/* Transcript Section */
.claim-call-transcript {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.transcript-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    text-align: center;
}

.transcript-placeholder i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.transcript-entry {
    margin-bottom: 0.35rem;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
}

.transcript-entry.insurance {
    background-color: #e0e7ff;
    border-left: 4px solid #6366f1;
}

.transcript-entry.provider {
    background-color: #dcfce7;
    border-left: 4px solid #22c55e;
}

.transcript-entry.system {
    background-color: #fef3c7;
    border-left: 4px solid #f59e0b;
    font-style: italic;
}

.transcript-speaker {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.transcript-text {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.transcript-detected-field {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    background-color: #22c55e;
    color: white;
    font-size: 0.75rem;
    border-radius: 4px;
}

/* Category separators in variables list */
.claim-var-category {
    font-size: 0.55rem;
    font-weight: 700;
    color: #8b5cf6;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 0.15rem 0.2rem;
    margin-top: 1px;
    border-bottom: 1px solid var(--border-color);
    grid-column: 1 / -1;
}

/* =====================================================
   CONVERSATIONS VIEW STYLES
   ===================================================== */

.conversations-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--bg-secondary);
}

.conversations-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.conversations-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.conversations-title h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.conversations-title h1 i {
    color: var(--primary-color);
}

.conversation-count {
    font-size: 0.875rem;
    color: var(--text-muted);
    background-color: var(--bg-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

.conversations-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.conversations-actions select {
    min-width: 150px;
}

/* Date Range Filter */
.date-range-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--bg-secondary);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.date-range-filter label {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.date-range-filter label i {
    color: var(--primary-color);
}

.date-range-filter .date-input {
    width: 130px;
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-primary);
}

.date-range-filter .date-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Conversations Stats */
.conversations-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 1rem 1.5rem;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.conversations-stats .stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.conversations-stats .stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    border-radius: 12px;
    font-size: 1.25rem;
}

.conversations-stats .stat-icon.success {
    background-color: #22c55e;
}

.conversations-stats .stat-icon.info {
    background-color: #3b82f6;
}

.conversations-stats .stat-info {
    display: flex;
    flex-direction: column;
}

.conversations-stats .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.conversations-stats .stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Conversations List Container */
.conversations-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem;
}

.conversations-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.conversations-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-muted);
}

.conversations-loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.conversations-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-muted);
    text-align: center;
}

.conversations-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Conversation Card */
.conversation-card {
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.conversation-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.conversation-card.has-recording {
    border-left: 3px solid #22c55e;
}

.conversation-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-secondary);
    border-radius: 50%;
    margin-right: 1rem;
    flex-shrink: 0;
}

.conversation-icon i {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.conversation-icon.inbound i {
    color: #22c55e;
}

.conversation-icon.outbound i {
    color: #3b82f6;
}

.conversation-info {
    flex: 1;
    min-width: 0;
}

/* Patient Info in Conversation Card */
.conversation-patient {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border-color);
}

.conversation-patient .patient-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.conversation-patient .patient-name i {
    color: var(--primary-color);
}

.conversation-patient .patient-member-id {
    font-size: 0.75rem;
    color: var(--text-muted);
    background-color: var(--bg-secondary);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

.conversation-patient .patient-payer {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.conversation-patient .patient-payer i {
    color: #6366f1;
    font-size: 0.7rem;
}

/* User & Org info on conversation cards */
.conversation-user-org {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    flex-wrap: wrap;
}

.conv-org-badge,
.conv-user-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-weight: 500;
}

.conv-org-badge {
    background-color: #ede9fe;
    color: #6d28d9;
}

.conv-org-badge i {
    font-size: 0.6rem;
    color: #7c3aed;
}

.conv-user-badge {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.conv-user-badge i {
    font-size: 0.6rem;
    color: #3b82f6;
}

.conversation-card.has-patient {
    border-left: 3px solid var(--primary-color);
}

.conversation-card.has-patient.has-recording {
    border-left: 3px solid #22c55e;
    border-top: 2px solid var(--primary-color);
}

.conversation-numbers {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.conversation-from,
.conversation-to {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.conversation-arrow {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.conversation-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.conversation-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.conversation-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    padding-left: 1rem;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

.status-badge.completed {
    background-color: #dcfce7;
    color: #166534;
}

.status-badge.busy {
    background-color: #fef3c7;
    color: #92400e;
}

.status-badge.no-answer {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-badge.failed {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-badge.canceled {
    background-color: #f3f4f6;
    color: #6b7280;
}

.status-badge.in-progress {
    background-color: #dbeafe;
    color: #1e40af;
}

.conversation-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
}

.conversation-actions .btn {
    padding: 0.5rem;
    min-width: 36px;
}

.recording-indicator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #22c55e;
    font-size: 0.75rem;
}

.recording-indicator i {
    font-size: 0.875rem;
}

.recording-indicator.loading {
    color: var(--text-muted);
}

.recording-indicator.loading i {
    color: var(--primary-color);
}

/* Audio Player Modal */
.audio-player-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.audio-player-content {
    background-color: var(--bg-primary);
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.audio-player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
}

.audio-player-header h3 {
    margin: 0;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.audio-player-header .btn-icon {
    background: transparent;
    color: white;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 4px;
}

.audio-player-header .btn-icon:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.audio-player-body {
    padding: 1.5rem;
}

.audio-player-info {
    margin-bottom: 1.5rem;
}

.audio-player-info .info-row {
    display: flex;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.audio-player-info .info-row:last-child {
    border-bottom: none;
}

.audio-player-info .info-label {
    width: 80px;
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.audio-player-info .info-value {
    flex: 1;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.audio-player-controls {
    margin-bottom: 1.5rem;
}

.audio-player-element {
    width: 100%;
    border-radius: 8px;
}

.audio-player-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .conversations-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .conversations-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .conversations-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .conversation-card {
        flex-wrap: wrap;
    }

    .conversation-status {
        width: 100%;
        margin-left: 0;
        margin-top: 0.75rem;
        padding-left: 0;
        padding-top: 0.75rem;
        border-top: 1px solid var(--border-color);
        justify-content: space-between;
    }
}

/* ============================================
   Template-Based Automated Workflow Steps
   ============================================ */

.template-workflows-container {
    margin: 1.5rem 0;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #0284c7;
    border-radius: 12px;
    padding: 1rem;
}

.template-workflows-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(2, 132, 199, 0.3);
}

.template-workflows-header h4 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #0369a1;
    font-size: 1rem;
}

.template-workflows-header h4 i {
    color: #0284c7;
}

.template-workflow-badge {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.template-workflows-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Template Workflow Step Styling */
.template-workflow-step {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px solid #94a3b8;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.template-workflow-step:hover {
    border-color: #64748b;
    box-shadow: 0 2px 8px rgba(100, 116, 139, 0.2);
}

.template-workflow-step .canonical-header {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    padding: 0.75rem 1rem;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
}

.template-workflow-step .canonical-header:hover {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
}

.template-workflow-step .canonical-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.template-workflow-step .canonical-header h3 {
    color: white;
    font-size: 0.9rem;
    margin: 0;
}

.template-workflow-step .canonical-header i {
    color: rgba(255,255,255,0.9);
}

.workflow-step-number {
    background: rgba(255,255,255,0.25);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.workflow-badge {
    background: rgba(255,255,255,0.25);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Reprompts Grid */
.reprompts-section {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
}

.reprompts-section .canonical-step-header .step-number {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.reprompts-section .canonical-step-header .step-title {
    color: #92400e;
    font-weight: 600;
}

.reprompts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 0.75rem;
}

.reprompt-item {
    background: white;
    border-radius: 8px;
    padding: 0.75rem;
    position: relative;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.reprompt-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.reprompt-item.no-input {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.reprompt-item.no-match {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, #faf5ff 0%, #ede9fe 100%);
}

.reprompt-item.final-fallback {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.reprompt-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.reprompt-item.no-input .reprompt-label {
    color: #b45309;
}

.reprompt-item.no-match .reprompt-label {
    color: #7c3aed;
}

.reprompt-item.final-fallback .reprompt-label {
    color: #dc2626;
}

.reprompt-text {
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.5;
    font-style: italic;
    padding-right: 2.5rem;
}

.speak-reprompt-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.35rem 0.5rem;
    font-size: 0.7rem;
    border-radius: 4px;
    background: white;
    border: 1px solid #d1d5db;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.speak-reprompt-btn:hover {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

/* Button size variants for reprompts */
.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid currentColor;
}

/* Collapsed state for template workflow content */
.template-workflow-step .canonical-content.collapsed {
    display: none;
}

.template-workflow-step .canonical-toggle-icon.collapsed {
    transform: rotate(0deg);
}

.template-workflow-step .canonical-toggle-icon {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}

/* Responsive template workflows */
@media (max-width: 768px) {
    .template-workflows-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .reprompts-grid {
        grid-template-columns: 1fr;
    }

    .template-workflow-step .canonical-header h3 {
        font-size: 0.8rem;
    }

    .workflow-badge {
        display: none;
    }
}

/* ============================================
   Template Select with Build Workflow Button
   ============================================ */

.template-select-with-build {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.template-select-with-build select {
    flex: 1;
}

#buildWorkflowBtn {
    white-space: nowrap;
    padding: 0.5rem 1rem;
}

/* ============================================
   Canonical Workflow Section (Claim Detail)
   ============================================ */

.canonical-workflow-section {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px solid #10b981;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.canonical-workflow-section h4 {
    color: #065f46;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.canonical-workflow-section h4 i {
    color: #10b981;
}

.workflow-template-badge {
    font-size: 0.75rem;
    font-weight: 400;
    color: #6b7280;
    margin-left: 0.5rem;
}

.canonical-workflow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}

/* Workflow Field (Variable-like) */
.workflow-field {
    background: white;
    border: 2px solid #10b981;
    position: relative;
}

.workflow-field:hover {
    border-color: #059669;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.workflow-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    margin-right: 0.5rem;
}

.workflow-info-btn {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #b45309;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.workflow-info-btn:hover {
    background: #fde68a;
    color: #92400e;
}

.workflow-response {
    color: #059669;
    font-weight: 600;
    cursor: pointer;
}

.workflow-response:hover {
    color: #047857;
    text-decoration: underline;
}

/* Workflow Step Details (? popup) */
.workflow-step-details {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-top: 2px solid #e2e8f0;
    padding: 1rem;
    margin-top: 0.75rem;
}

.workflow-detail-section {
    margin-bottom: 0.75rem;
}

.workflow-detail-section:last-child {
    margin-bottom: 0;
}

.workflow-detail-section .detail-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.workflow-detail-section .detail-content {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-style: italic;
    line-height: 1.4;
}

.workflow-detail-section.ivr-section .detail-label {
    color: #0369a1;
}

.workflow-detail-section.response-section .detail-label {
    color: #059669;
}

.workflow-detail-section.response-section .canonical-response {
    color: #059669;
    font-weight: 600;
    font-style: normal;
}

/* Mini Reprompts Grid */
.reprompts-mini-grid {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.reprompt-mini {
    display: flex;
    gap: 0.5rem;
    font-size: 0.75rem;
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
    background: #f8fafc;
}

.reprompt-mini.no-input {
    border-left: 3px solid #f59e0b;
}

.reprompt-mini.no-match {
    border-left: 3px solid #8b5cf6;
}

.reprompt-mini.fallback {
    border-left: 3px solid #ef4444;
}

.reprompt-type {
    font-weight: 600;
    color: #64748b;
    min-width: 80px;
}

.reprompt-text-mini {
    color: #475569;
    font-style: italic;
}

/* ============================================
   Active Call Workflow Section
   ============================================ */

.active-call-workflow-section {
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #0284c7;
    border-radius: 8px;
    padding: 1rem;
}

.active-call-workflow-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.active-call-workflow-section .section-header h2 {
    color: #0369a1;
    font-size: 1rem;
    margin: 0;
}

.workflow-step-progress {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.active-call-workflow-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Active Workflow Step */
.active-workflow-step {
    background: white;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.active-workflow-step.active {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
}

.active-workflow-step.completed {
    border-color: #10b981;
    background: #f0fdf4;
}

.active-workflow-step.completed .workflow-step-num {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.workflow-step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    cursor: pointer;
    transition: background 0.2s ease;
}

.workflow-step-header:hover {
    background: #f1f5f9;
}

.workflow-step-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.workflow-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
}

.active-workflow-step.active .workflow-step-num {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}

.workflow-step-title {
    font-weight: 600;
    color: var(--text-primary);
}

.workflow-step-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.workflow-step-right .speak-btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
}

.listen-badge {
    background: #fef3c7;
    color: #b45309;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.step-toggle {
    color: #94a3b8;
    transition: transform 0.3s ease;
}

.step-toggle.collapsed {
    transform: rotate(-90deg);
}

/* Workflow Step Content */
.workflow-step-content {
    padding: 1rem;
    border-top: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.workflow-step-content.collapsed {
    display: none;
}

.step-ivr,
.step-response,
.step-reprompts {
    margin-bottom: 0.75rem;
}

.step-ivr:last-child,
.step-response:last-child,
.step-reprompts:last-child {
    margin-bottom: 0;
}

.step-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.step-ivr .step-label {
    color: #0369a1;
}

.step-response .step-label {
    color: #059669;
}

.step-text {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-style: italic;
    line-height: 1.5;
}

.step-text.response-text {
    color: #059669;
    font-weight: 600;
    font-style: normal;
}

/* Compact Reprompts */
.reprompts-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.reprompt-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: help;
}

.reprompt-tag.no-input {
    background: #fef3c7;
    color: #b45309;
}

.reprompt-tag.no-match {
    background: #ede9fe;
    color: #7c3aed;
}

.reprompt-tag.fallback {
    background: #fee2e2;
    color: #dc2626;
}

/* ============================================
   Active Call Modal - Scrollable Layout
   ============================================ */

.claim-call-body {
    max-height: calc(100vh - 100px);
    overflow: hidden;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* ============================================
   Template Mode Sections (Full Width Horizontal)
   ============================================ */

.template-mode-sections {
    width: 100%;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}

/* Automated Workflow Section */
.automated-workflow-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #0284c7;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.automated-workflow-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(2, 132, 199, 0.2);
}

.workflow-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.workflow-header-left h3 {
    margin: 0;
    color: #0369a1;
    font-size: 1rem;
}

.workflow-header-left i {
    color: #0284c7;
}

.workflow-template-name {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 400;
}

.workflow-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Horizontal Workflow Steps Container */
.automated-workflow-steps {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scroll-behavior: smooth;
}

.automated-workflow-steps::-webkit-scrollbar {
    height: 6px;
}

.automated-workflow-steps::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 3px;
}

.automated-workflow-steps::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 3px;
}

/* Horizontal Workflow Step Card */
.h-workflow-step {
    flex: 0 0 auto;
    width: 200px;
    background: white;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.75rem;
    transition: all 0.3s ease;
    position: relative;
}

.h-workflow-step:hover {
    border-color: #64748b;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.h-workflow-step.active {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
}

.h-workflow-step.completed {
    border-color: #10b981;
    background: #f0fdf4;
}

.h-workflow-step.completed .h-step-num {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.h-step-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.h-step-num {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

.h-workflow-step.active .h-step-num {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}

.h-step-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.h-step-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.h-workflow-step:hover .h-step-actions {
    opacity: 1;
}

.btn-icon {
    width: 22px;
    height: 22px;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: #e2e8f0;
    color: #334155;
}

.btn-icon.delete-step:hover {
    background: #fee2e2;
    color: #dc2626;
}

.h-step-ivr {
    font-size: 0.7rem;
    color: #64748b;
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.h-step-ivr i {
    color: #0284c7;
    margin-top: 2px;
    flex-shrink: 0;
}

.h-step-ivr span {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.h-step-response {
    margin-bottom: 0.5rem;
}

.speak-step-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem;
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
}

.speak-step-btn span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.h-step-listen {
    margin-bottom: 0.5rem;
}

.listen-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem;
    background: #fef3c7;
    color: #b45309;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
}

.h-step-reprompts {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.reprompt-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    cursor: help;
}

.reprompt-dot.no-input {
    background: #f59e0b;
}

.reprompt-dot.no-match {
    background: #8b5cf6;
}

.reprompt-dot.fallback {
    background: #ef4444;
}

/* Quick Phrases Section (Horizontal) */
.quick-phrases-section-horizontal {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 8px;
    padding: 0;
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
    max-height: 180px;
    overflow: hidden;
}

.quick-phrases-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    position: sticky;
    top: 0;
    z-index: 10;
    flex-shrink: 0;
}

.quick-phrases-horizontal-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    overflow-y: auto;
    flex: 1;
}

/* Transcript Controls */
.transcript-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.clear-transcript-btn {
    padding: 0.25rem 0.4rem;
    font-size: 0.7rem;
}

.clear-transcript-btn:hover {
    background-color: #ef4444;
    color: white;
    border-color: #ef4444;
}

.phrases-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.phrases-header-left h3 {
    margin: 0;
    color: white;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.phrases-header-left i {
    color: white;
}

.phrases-header-left .add-phrase-header-btn {
    background: rgba(255,255,255,0.25);
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
}

.phrases-header-left .add-phrase-header-btn:hover {
    background: rgba(255,255,255,0.4);
}

.phrases-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.phrases-header-right input {
    width: 150px;
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
}

.quick-phrases-horizontal-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.h-quick-phrase-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    background: white;
    border: 1px solid #f59e0b;
    border-radius: 20px;
    font-size: 0.75rem;
    color: #92400e;
    cursor: pointer;
    transition: all 0.2s ease;
}

.h-quick-phrase-btn:hover {
    background: #f59e0b;
    color: white;
}

.h-quick-phrase-btn i {
    font-size: 0.65rem;
}

/* Non-template only section */
.non-template-only {
    display: block;
}

/* Claim Call Content Grid - Flexible Scrollable */
.claim-call-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.claim-call-variables-section {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.claim-call-variables-section .section-header {
    flex-shrink: 0;
}

.claim-call-variables-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.claim-call-transcript-section {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.claim-call-transcript-section .section-header {
    flex-shrink: 0;
}

.claim-call-transcript {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* Live Speak Input Styles */
.live-speak-input-group {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.live-speak-input {
    min-width: 180px;
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
}

.live-speak-input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.live-speak-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem 0.6rem;
    white-space: nowrap;
}

.live-speak-btn i {
    font-size: 0.85rem;
}

.live-speak-section {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed var(--border-color);
}

.live-speak-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.live-speak-row .live-speak-input {
    flex: 1;
}

/* Add Phrase Header Button */
.add-phrase-header-btn {
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
    margin-left: 0.5rem;
}

.add-phrase-header-btn i {
    font-size: 0.65rem;
}

.btn-xs {
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
    line-height: 1;
}

/* Workflow Edit Modal */
.workflow-edit-modal .modal {
    max-width: 500px;
}

.workflow-edit-modal .form-group {
    margin-bottom: 1rem;
}

.workflow-edit-modal label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
}

.workflow-edit-modal .form-textarea {
    width: 100%;
    resize: vertical;
}

/* Responsive */
@media (max-width: 768px) {
    .template-select-with-build {
        flex-direction: column;
    }

    .template-select-with-build select {
        width: 100%;
    }

    #buildWorkflowBtn {
        width: 100%;
    }

    .canonical-workflow-grid {
        grid-template-columns: 1fr;
    }

    .workflow-step-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .workflow-step-right {
        width: 100%;
        justify-content: space-between;
    }

    .claim-call-content-grid {
        grid-template-columns: 1fr;
    }

    .automated-workflow-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .quick-phrases-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .phrases-header-right {
        width: 100%;
    }

    .phrases-header-right input {
        flex: 1;
    }

    .h-workflow-step {
        width: 180px;
    }
}

/* ============================================
   Claim Detail Modal - Horizontal Workflow Section
   ============================================ */

.claim-detail-workflow-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #0284c7;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
}

.workflow-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(2, 132, 199, 0.2);
}

.workflow-section-header h3 {
    margin: 0;
    color: #0369a1;
    font-size: 1rem;
}

.workflow-steps-horizontal {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scroll-behavior: smooth;
}

.workflow-steps-horizontal::-webkit-scrollbar {
    height: 6px;
}

.workflow-steps-horizontal::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 3px;
}

.workflow-steps-horizontal::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 3px;
}

/* Horizontal Workflow Card */
.h-workflow-card {
    flex: 0 0 auto;
    width: 220px;
    background: white;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.h-workflow-card:hover {
    border-color: #0284c7;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.2);
}

.h-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.h-card-num {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

.h-card-title {
    font-size: 0.8rem;
    font-weight: 600;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.h-card-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.h-workflow-card:hover .h-card-actions {
    opacity: 1;
}

.btn-icon-sm {
    width: 20px;
    height: 20px;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
}

.btn-icon-sm:hover {
    background: #e2e8f0;
}

.btn-icon-sm.delete:hover {
    background: #fee2e2;
    color: #dc2626;
}

.h-card-ivr {
    font-size: 0.7rem;
    color: #64748b;
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    min-height: 35px;
}

.h-card-ivr i {
    color: #0284c7;
    flex-shrink: 0;
    margin-top: 2px;
}

.h-card-ivr span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.h-card-response {
    margin-bottom: 0.5rem;
}

.speak-response-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.speak-response-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
}

.speak-response-btn span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.h-card-listen {
    margin-bottom: 0.5rem;
}

.h-card-listen span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem;
    background: #fef3c7;
    color: #b45309;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
}

.h-card-reprompts {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.h-card-reprompts .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    cursor: help;
}

.h-card-reprompts .dot.no-input { background: #f59e0b; }
.h-card-reprompts .dot.no-match { background: #8b5cf6; }
.h-card-reprompts .dot.fallback { background: #ef4444; }

/* Quick Phrases Horizontal Section */
.quick-phrases-horizontal-section {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: 6px;
    padding: 0;
    margin-bottom: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.quick-phrases-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    position: sticky;
    top: 0;
    z-index: 10;
    flex-shrink: 0;
}

.quick-phrases-header-bar h3 {
    margin: 0;
    color: white;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.quick-phrases-header-bar .phrases-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-phrases-header-bar .phrases-header-left i {
    color: white;
}

.quick-phrases-header-bar .phrases-header-left .add-phrase-header-btn {
    background: rgba(255,255,255,0.25);
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
}

.quick-phrases-header-bar .phrases-header-left .add-phrase-header-btn:hover {
    background: rgba(255,255,255,0.4);
}

.quick-phrases-header-bar .phrases-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-phrases-header-bar .phrases-header-right input {
    width: 200px;
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 4px;
    background: rgba(255,255,255,0.9);
}

.quick-phrases-list-horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    overflow-y: auto;
    flex: 1;
}

.quick-phrase-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    background: white;
    border: 1px solid #f59e0b;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #92400e;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-phrase-pill:hover {
    background: #f59e0b;
    color: white;
    transform: translateY(-1px);
}

.quick-phrase-pill i {
    font-size: 0.65rem;
}

/* Phrase remove button on quick phrase buttons */
.h-quick-phrase-btn .phrase-remove,
.quick-phrase-pill .phrase-remove {
    opacity: 0;
    margin-left: 0.25rem;
    color: #dc2626;
    transition: opacity 0.2s ease;
}

.h-quick-phrase-btn:hover .phrase-remove,
.quick-phrase-pill:hover .phrase-remove {
    opacity: 1;
}

.h-quick-phrase-btn .phrase-remove:hover,
.quick-phrase-pill .phrase-remove:hover {
    color: #b91c1c;
}

/* Phrase Categories Horizontal Section */
.phrase-categories-horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-top: 1px solid rgba(245, 158, 11, 0.3);
}

/* Compact Phrase Category */
.phrase-category-compact {
    background: white;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    overflow: hidden;
    min-width: 180px;
    max-width: 250px;
    flex: 1;
}

.phrase-category-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    cursor: pointer;
    gap: 0.5rem;
}

.phrase-category-header-compact:hover {
    background: linear-gradient(135deg, #fde68a 0%, #fcd34d 100%);
}

.phrase-category-title-compact {
    font-size: 0.75rem;
    font-weight: 600;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.phrase-category-title-compact i {
    color: #f59e0b;
}

.phrase-category-title-compact .category-count {
    font-weight: 400;
    font-size: 0.65rem;
    color: #b45309;
}

.phrase-category-actions-compact {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-random-compact {
    padding: 0.25rem 0.4rem;
    background: #f59e0b;
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-random-compact:hover {
    background: #d97706;
}

.phrase-category-toggle-compact {
    font-size: 0.65rem;
    color: #92400e;
    transition: transform 0.2s ease;
}

.phrase-category-toggle-compact.collapsed {
    transform: rotate(-90deg);
}

.phrase-category-content-compact {
    padding: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    max-height: 150px;
    overflow-y: auto;
    transition: all 0.2s ease;
}

.phrase-category-content-compact.collapsed {
    display: none;
}

.phrase-variation-compact {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.5rem;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 12px;
    font-size: 0.7rem;
    color: #92400e;
    cursor: pointer;
    transition: all 0.2s ease;
}

.phrase-variation-compact:hover {
    background: #f59e0b;
    color: white;
    border-color: #f59e0b;
}

.phrase-variation-compact i {
    font-size: 0.6rem;
}

/* Template mode sections scrolling */
.template-mode-sections {
    width: 100%;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 1rem;
    max-height: 350px;
    overflow-y: auto;
}

.automated-workflow-section {
    margin-bottom: 0.75rem;
}

/* Responsive */
@media (max-width: 768px) {
    .workflow-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .quick-phrases-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .quick-phrases-header-bar .phrases-header-right {
        width: 100%;
    }

    .quick-phrases-header-bar .phrases-header-right input {
        flex: 1;
    }

    .h-workflow-card {
        width: 180px;
    }
}

/* ============================================
   Batch Management Module
   ============================================ */

.batch-management-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 1.5rem;
    background: var(--bg-primary);
}

.batch-management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.batch-management-title h1 {
    margin: 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.batch-management-title h1 i {
    color: #8b5cf6;
}

.batch-count {
    display: inline-block;
    margin-left: 1rem;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.batch-management-actions {
    display: flex;
    gap: 0.75rem;
}

/* Batch Stats */
.batch-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.batch-stats .stat-card {
    background: white;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
}

.batch-stats .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #64748b;
}

.batch-stats .stat-icon.pending {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
}

.batch-stats .stat-icon.active {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #2563eb;
}

.batch-stats .stat-icon.success {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #16a34a;
}

.batch-stats .stat-info {
    display: flex;
    flex-direction: column;
}

.batch-stats .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.batch-stats .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Batch Empty State */
.batch-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    border: 2px dashed #e2e8f0;
}

.batch-empty-state i {
    font-size: 4rem;
    color: #8b5cf6;
    opacity: 0.5;
    margin-bottom: 1rem;
}

.batch-empty-state h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.batch-empty-state p {
    margin: 0 0 1.5rem 0;
    color: var(--text-muted);
    max-width: 400px;
}

/* Batch Claims Grid */
.batch-claims-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
    overflow-y: auto;
    padding-right: 0.5rem;
    align-content: start;
}

/* Batch Claim Card — legacy styles replaced by enhanced version below in this file */

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Claim Selector Modal */
.claim-selector-body {
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 60vh;
}

.claim-selector-filters {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
}

.claim-selector-filters input[type="text"] {
    flex: 1;
}

.claim-selector-filters select {
    width: 200px;
}

.select-all-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.select-all-label:hover {
    background: #e2e8f0;
}

.select-all-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.claim-selector-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 0.75rem;
    align-content: start;
}

.claim-selector-item {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.claim-selector-item:hover {
    border-color: #a5b4fc;
    background: #f5f3ff;
}

.claim-selector-item.selected {
    border-color: #6366f1;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
}

.claim-selector-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 0.1rem;
    cursor: pointer;
    accent-color: #6366f1;
}

.claim-selector-item-content {
    flex: 1;
}

.claim-selector-item-patient {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.claim-selector-item-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 1rem;
}

.selected-count {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-right: auto;
}

/* ============================================
   Multi-Call Modal (Tabbed Interface)
   ============================================ */

.modal-fullscreen {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    margin: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
}

.multi-call-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-bottom: 1px solid #334155;
    color: white;
    font-weight: 700;
}

.multi-call-tabs {
    display: flex;
    gap: 0.25rem;
    flex: 1;
    overflow-x: auto;
    padding: 0.25rem 0;
}

.multi-call-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-size: 0.85rem;
}

.multi-call-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.multi-call-tab.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #3b82f6;
    color: white;
}

.multi-call-tab.on-hold {
    background: rgba(236, 72, 153, 0.2);
    border-color: #ec4899;
    color: #f9a8d4;
}

.multi-call-tab.completed {
    background: rgba(34, 197, 94, 0.2);
    border-color: #22c55e;
    color: #86efac;
}

.multi-call-tab .tab-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.multi-call-tab.active .tab-status {
    background: #86efac;
    animation: tabPulse 1.5s ease-in-out infinite;
}

.multi-call-tab.on-hold .tab-status {
    background: #f9a8d4;
    animation: tabPulse 2s ease-in-out infinite;
}

@keyframes tabPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.multi-call-tab .tab-close {
    background: none;
    border: none;
    color: currentColor;
    opacity: 0.5;
    cursor: pointer;
    padding: 0.15rem;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.multi-call-tab .tab-close:hover {
    opacity: 1;
    background: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.multi-call-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    font-weight: 700;
}

.active-calls-count {
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    padding-right: 0.75rem;
    border-right: 1px solid #334155;
}

.multi-call-body {
    flex: 1;
    display: flex;
    overflow: hidden;
    background: var(--bg-primary);
}

.multi-call-panel {
    flex: 1;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.multi-call-panel.active {
    display: flex;
}

/* Multi-call panel inherits claim-call-body styles */
.multi-call-panel .claim-call-body {
    flex: 1;
    max-height: none;
    height: 100%;
}

/* Minimized Multi-Call Bar */
.multi-call-minimized {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    border: 1px solid #334155;
}

.multi-call-minimized .minimized-tabs {
    display: flex;
    gap: 0.5rem;
}

.multi-call-minimized .minimized-tab {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.15s ease;
}

.multi-call-minimized .minimized-tab:hover {
    background: rgba(255, 255, 255, 0.2);
}

.multi-call-minimized .minimized-tab.active {
    background: #3b82f6;
}

.multi-call-minimized .expand-btn {
    background: #3b82f6;
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.multi-call-minimized .expand-btn:hover {
    background: #2563eb;
}

/* Responsive */
@media (max-width: 768px) {
    .batch-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .batch-claims-grid {
        grid-template-columns: 1fr;
    }

    .claim-selector-filters {
        flex-wrap: wrap;
    }

    .claim-selector-filters select {
        width: 100%;
    }

    .multi-call-tabs {
        max-width: 50vw;
    }
}

/* =====================================================
   Batch Call Panel Content Styles
   ===================================================== */

.batch-call-content {
    display: flex;
    flex: 1;
    gap: 1.5rem;
    padding: 1rem;
    overflow: hidden;
    height: 100%;
}

.batch-call-left {
    flex: 0 0 420px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
}

.batch-call-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow: hidden;
}

/* Call Info Section */
.batch-call-info-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.batch-call-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.batch-call-info-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.batch-call-info-header h3 i {
    color: #22c55e;
}

.batch-call-timer {
    font-family: 'SF Mono', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
}

.batch-call-claim-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.batch-call-claim-info .info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0;
}

.batch-call-claim-info .info-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.batch-call-claim-info .info-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Variables Section */
.batch-call-variables-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.batch-call-variables-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.batch-call-variables-section h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.batch-call-variables {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.batch-var-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.85rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.batch-var-item:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}

.batch-var-item .var-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    min-width: 100px;
}

.batch-var-item .var-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
    text-align: right;
    margin-right: 0.5rem;
}

.batch-var-item .speak-icon {
    color: #3b82f6;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.batch-var-item:hover .speak-icon {
    opacity: 1;
}

/* Transcript Section */
.batch-call-transcript-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.batch-call-transcript-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.batch-call-transcript-section h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.batch-call-transcript {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.batch-call-transcript .transcript-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-tertiary);
    text-align: center;
}

.batch-call-transcript .transcript-placeholder i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.batch-call-transcript .transcript-entry {
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

.batch-call-transcript .transcript-entry.provider {
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid #3b82f6;
}

.batch-call-transcript .transcript-entry.ivr {
    background: rgba(156, 163, 175, 0.1);
    border-left: 3px solid #9ca3af;
}

.batch-call-transcript .transcript-time {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-right: 0.5rem;
}

.batch-call-transcript .transcript-speaker {
    font-weight: 600;
    margin-right: 0.35rem;
}

.batch-call-transcript .transcript-field {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-left: 0.5rem;
    background: var(--bg-primary);
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
}

/* Actions Section */
.batch-call-actions-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.batch-call-actions-section .live-speak-sticky {
    margin-bottom: 1rem;
}

.batch-call-actions-section .live-speak-input-wrapper {
    display: flex;
    gap: 0.5rem;
}

.batch-call-actions-section .live-speak-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.batch-call-actions-section .live-speak-input:focus {
    outline: none;
    border-color: #3b82f6;
}

.batch-call-actions-section .btn-speak {
    padding: 0.75rem 1rem;
}

.batch-quick-phrases {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.batch-quick-phrases .quick-phrase-btn {
    padding: 0.5rem 0.85rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.batch-quick-phrases .quick-phrase-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: #3b82f6;
}

.batch-quick-phrases .quick-phrase-btn i {
    font-size: 0.8rem;
}

.batch-call-controls {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* Claim Selector Additional Styles */
.claim-selector-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    flex-shrink: 0;
}

.claim-selector-item.already-selected {
    opacity: 0.6;
    background: var(--bg-tertiary);
}

.already-in-batch-badge {
    font-size: 0.75rem;
    color: #22c55e;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.claim-selector-info {
    flex: 1;
    min-width: 0;
}

.claim-selector-primary {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.35rem;
}

.claim-selector-primary .claim-patient {
    font-weight: 600;
    color: var(--text-primary);
}

.claim-selector-primary .claim-insurance {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.claim-selector-secondary {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.claim-selector-secondary span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.select-all-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Multi-call tab status indicators */
.call-tab-status {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.call-tab-status.status-active,
.call-tab-status.status-in-progress {
    background: #22c55e;
    color: white;
}

.call-tab-status.status-ringing,
.call-tab-status.status-queued {
    background: #f59e0b;
    color: white;
    animation: pulse 1s infinite;
}

.call-tab-status.status-on-hold {
    background: #6366f1;
    color: white;
}

.call-tab-status.status-completed {
    background: #64748b;
    color: white;
}

.call-tab-status.status-failed {
    background: #ef4444;
    color: white;
}

.call-tab-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.call-tab-patient {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.call-tab-insurance {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.call-tab-close {
    background: rgba(239, 68, 68, 0.2);
    border: none;
    color: #ef4444;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    opacity: 0;
}

.multi-call-tab:hover .call-tab-close {
    opacity: 1;
}

.call-tab-close:hover {
    background: #ef4444;
    color: white;
}

/* Batch call variables with grid layout (matching claims variable grid) */
.batch-call-variables.claim-call-variables-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.25rem;
    align-content: start;
}

/* Batch Call Status Banner */
.batch-call-status-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-bottom: 2px solid #22c55e;
}

[data-theme="dark"] .batch-call-status-banner {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.08) 100%);
}

.status-banner-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-banner-left .status-indicator {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-banner-left .status-indicator.connected {
    color: #16a34a;
}

.status-banner-left .status-indicator.connected i {
    color: #22c55e;
    animation: pulse 1.5s infinite;
}

.status-banner-left .status-indicator.connecting {
    color: #d97706;
}

.status-banner-left .status-indicator.connecting i {
    color: #f59e0b;
    animation: pulse 1s infinite;
}

.status-banner-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Batch card active indicator (pulsing green badge) */
.batch-card-active-indicator {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid #22c55e;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #16a34a;
}

.batch-card-active-indicator .active-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    animation: pulse 1.5s infinite;
}

.batch-card-active-indicator .batch-card-timer {
    font-family: 'SF Mono', monospace;
    font-size: 0.7rem;
    color: #16a34a;
}

/* Minimized bar status dot */
.minimized-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.minimized-status-dot.status-active {
    background: #22c55e;
    animation: pulse 1.5s infinite;
}

.minimized-status-dot.status-hold {
    background: #f59e0b;
    animation: pulse 2s infinite;
}

.minimized-patient {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.minimized-timer {
    font-family: 'SF Mono', monospace;
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Responsive Batch Call Panel */
@media (max-width: 1024px) {
    .batch-call-content {
        flex-direction: column;
    }

    .batch-call-left {
        flex: 0 0 auto;
        max-height: 200px;
    }

    .batch-call-right {
        flex: 1;
        min-height: 0;
    }

    .batch-call-status-banner {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/* =====================================================
   Batch Info Header & History Styles
   ===================================================== */

.batch-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    border-bottom: 1px solid var(--border-color);
    margin: 0 -1.5rem 1rem -1.5rem;
}

.batch-info-id {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'SF Mono', 'Monaco', monospace;
}

.batch-info-id i {
    color: #3b82f6;
}

.batch-id-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.batch-id-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.batch-info-id .btn-copy {
    opacity: 0.5;
    transition: opacity 0.15s ease;
}

.batch-info-id:hover .btn-copy {
    opacity: 1;
}

.batch-info-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.batch-created {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.batch-created i {
    color: var(--text-tertiary);
}

.batch-status {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.batch-status.status-active {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.batch-status.status-active i {
    font-size: 0.5rem;
    animation: pulse 1.5s infinite;
}

.batch-status.status-completed {
    background: rgba(100, 116, 139, 0.15);
    color: #64748b;
}

.batch-info-actions {
    display: flex;
    gap: 0.5rem;
}

/* Batch History Modal */
.batch-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

.batch-history-item:hover {
    background: var(--bg-tertiary);
    border-color: #3b82f6;
}

.batch-history-item.active {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}

.batch-history-main {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.batch-history-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.batch-history-id {
    font-family: 'SF Mono', 'Monaco', monospace;
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.batch-history-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.batch-history-stats {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.batch-active-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.15);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

/* Claim selector selected state */
.claim-selector-item.selected {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}

.claim-selector-item .no-phone {
    color: #ef4444;
    opacity: 0.7;
}

/* Loading spinner for claim selector */
.claim-selector-list .loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-secondary);
    gap: 0.75rem;
}

.claim-selector-list .loading-spinner i {
    font-size: 1.5rem;
    color: #3b82f6;
}

/* Error state */
.claim-selector-list .error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
    color: var(--text-secondary);
}

.claim-selector-list .error-state i {
    font-size: 2.5rem;
    color: #ef4444;
    margin-bottom: 1rem;
}

.claim-selector-list .error-state h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .batch-info-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .batch-info-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .batch-info-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* =====================================================
   In-App Message & Input Modal Styles
   ===================================================== */

.in-app-message-modal {
    max-width: 400px;
    text-align: center;
    padding: 0;
}

.in-app-message-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.in-app-message-icon {
    font-size: 3rem;
}

.in-app-message-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.in-app-message-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.in-app-input-modal {
    max-width: 450px;
}

.in-app-input-modal .modal-body {
    padding: 1.5rem;
}

.in-app-input-modal .form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

/* Batch history delete button */
.batch-history-item {
    position: relative;
}

.batch-history-delete {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    background: rgba(239, 68, 68, 0.1);
    border: none;
    color: #ef4444;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.15s ease;
}

.batch-history-item:hover .batch-history-delete {
    opacity: 1;
}

.batch-history-delete:hover {
    background: #ef4444;
    color: white;
}

.batch-history-item.active .batch-history-delete {
    display: none;
}

/* Confirm modal buttons */
.in-app-confirm-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.in-app-confirm-buttons .btn {
    min-width: 100px;
}

/* Batch history note */
.batch-history-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.batch-history-note i {
    color: #3b82f6;
}

/* ============================================================================
   STATUS MANAGEMENT MODAL
   ============================================================================ */

.status-management-modal {
    max-width: 800px;
    width: 95%;
}

.status-management-claim-info {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.status-claim-patient {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.status-claim-patient i {
    color: #6366f1;
}

.status-claim-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.status-management-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .status-management-sections {
        grid-template-columns: 1fr;
    }
}

.status-change-section h3,
.status-history-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.status-change-section h3 i { color: #3b82f6; }
.status-history-section h3 i { color: #6366f1; }

/* Status Grid */
.status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

@media (max-width: 500px) {
    .status-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.status-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    background: white;
}

.status-option:hover {
    border-color: var(--status-color, #6366f1);
    background: rgba(99, 102, 241, 0.05);
}

.status-option.active {
    border-color: var(--status-color, #6366f1);
    background: var(--status-color, #6366f1);
    color: white;
}

.status-option i {
    font-size: 1.25rem;
    color: var(--status-color, #6366f1);
}

.status-option.active i {
    color: white;
}

.status-option span {
    font-size: 0.7rem;
    font-weight: 500;
    text-align: center;
}

/* Status Note Section */
.status-note-section {
    margin-bottom: 1rem;
}

.status-note-section label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.status-note-section label i {
    color: #f59e0b;
}

.status-note-section textarea {
    width: 100%;
    resize: vertical;
    min-height: 80px;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: inherit;
}

.status-note-section textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Status History List */
.status-history-section {
    max-height: 400px;
    display: flex;
    flex-direction: column;
}

.status-history-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.status-history-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 2rem;
    color: var(--text-muted);
    text-align: center;
}

.status-history-empty i {
    font-size: 2rem;
    opacity: 0.3;
}

.status-history-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.status-history-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Status badge colors */
.status-history-badge.pending { background: #fef3c7; color: #b45309; }
.status-history-badge.in_progress { background: #dbeafe; color: #1d4ed8; }
.status-history-badge.on_hold { background: #e0e7ff; color: #4338ca; }
.status-history-badge.ready_for_submission { background: #d1fae5; color: #047857; }
.status-history-badge.submitted { background: #ede9fe; color: #6d28d9; }
.status-history-badge.completed { background: #dcfce7; color: #15803d; }
.status-history-badge.denied { background: #fee2e2; color: #b91c1c; }
.status-history-badge.appealed { background: #ffedd5; color: #c2410c; }
.status-history-badge.closed { background: #f3f4f6; color: #4b5563; }

.status-history-info {
    flex: 1;
    min-width: 0;
}

.status-history-date {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-bottom: 0.25rem;
}

.status-history-note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 0.5rem;
    background: white;
    border-radius: 4px;
    margin-top: 0.25rem;
}

.status-history-note i {
    color: #3b82f6;
    margin-top: 0.1rem;
}

/* Claim status badges in claim cards */
.claim-status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.claim-status-badge.pending { background: #fef3c7; color: #b45309; }
.claim-status-badge.in_progress { background: #dbeafe; color: #1d4ed8; }
.claim-status-badge.on_hold { background: #e0e7ff; color: #4338ca; }
.claim-status-badge.ready_for_submission { background: #d1fae5; color: #047857; }
.claim-status-badge.submitted { background: #ede9fe; color: #6d28d9; }
.claim-status-badge.completed { background: #dcfce7; color: #15803d; }
.claim-status-badge.denied { background: #fee2e2; color: #b91c1c; }
.claim-status-badge.appealed { background: #ffedd5; color: #c2410c; }
.claim-status-badge.closed { background: #f3f4f6; color: #4b5563; }

/* ============================================================================
   IMPROVED BATCH CLAIMS GRID
   ============================================================================ */

/* Make batch claims grid more responsive with better spacing */
#batchClaimsGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

/* Enhanced batch claim card — redesigned with top status border */
.batch-claim-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: visible;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.batch-claim-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #a5b4fc;
}

/* Top status border strip */
.batch-card-status-border {
    height: 3px;
    width: 100%;
    flex-shrink: 0;
}

.status-border-pending { background: #eab308; }
.status-border-calling { background: #3b82f6; }
.status-border-active { background: #10b981; }
.status-border-on-hold { background: #f59e0b; }
.status-border-completed { background: #6b7280; }
.status-border-failed { background: #ef4444; }

.batch-claim-card[data-status="active"] {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.02) 0%, rgba(16, 185, 129, 0.06) 100%);
}

.batch-claim-card[data-status="on-hold"] {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.02) 0%, rgba(245, 158, 11, 0.06) 100%);
}

.batch-claim-card[data-status="completed"] {
    opacity: 0.75;
}

.batch-claim-card[data-status="failed"] {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.02) 0%, rgba(239, 68, 68, 0.06) 100%);
}

/* Card header: patient name + status pill + remove button */
.batch-claim-card .batch-claim-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem 0.5rem;
    gap: 0.5rem;
}

.batch-claim-patient-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.batch-claim-header-right {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

/* Status pill badge */
.batch-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-pill-pending { background: #fef3c7; color: #d97706; }
.status-pill-calling { background: #dbeafe; color: #2563eb; animation: statusPulse 1.5s ease-in-out infinite; }
.status-pill-active { background: #d1fae5; color: #059669; }
.status-pill-on-hold { background: #fef3c7; color: #d97706; }
.status-pill-completed { background: #dcfce7; color: #16a34a; }
.status-pill-failed { background: #fee2e2; color: #dc2626; }

/* Remove button — small X in top-right */
.batch-card-remove-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.15s;
}

.batch-card-remove-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* 2-column info grid */
.batch-claim-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0.5rem 1rem 0.75rem;
}

.batch-info-cell {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.batch-info-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
}

.batch-info-value {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.batch-info-amount {
    font-weight: 700;
    color: #059669;
}

/* Card footer with full-width action button */
.batch-claim-footer {
    padding: 0.5rem 1rem 0.75rem;
    border-top: 1px solid var(--border-color);
}

.batch-card-action-btn {
    width: 100%;
    padding: 0.5rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* Active indicator with timer (when call is minimized) */
.batch-card-active-indicator {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 1rem;
    background: rgba(16, 185, 129, 0.08);
    font-size: 0.75rem;
    font-weight: 600;
    color: #059669;
}

.batch-card-active-indicator .active-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    animation: statusPulse 1.5s ease-in-out infinite;
}

.batch-card-timer {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
}

/* Batch info header — editable name and assignee */
.batch-info-header {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-secondary, #f8fafc);
    border-bottom: 1px solid var(--border-color);
}

.batch-info-row-top {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.batch-info-row-bottom {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    font-size: 0.8rem;
}

.batch-header-editable {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex: 1;
    min-width: 0;
    position: relative;
}

.batch-name-input {
    border: 1px solid transparent;
    background: transparent;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    padding: 0.25rem 0.4rem;
    border-radius: 6px;
    width: 100%;
    transition: all 0.15s;
}

.batch-name-input:hover {
    border-color: var(--border-color);
    background: white;
}

.batch-name-input:focus {
    outline: none;
    border-color: var(--primary-color, #6366f1);
    background: white;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.batch-name-edit-icon {
    color: var(--text-muted);
    font-size: 0.7rem;
    pointer-events: none;
    opacity: 0.5;
}

.batch-assignee-field {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.batch-assignee-field i {
    font-size: 0.8rem;
}

.batch-assignee-input {
    border: 1px solid transparent;
    background: transparent;
    font-size: 0.85rem;
    color: var(--text-primary);
    padding: 0.25rem 0.4rem;
    border-radius: 6px;
    width: 140px;
    transition: all 0.15s;
}

.batch-assignee-input:hover {
    border-color: var(--border-color);
    background: white;
}

.batch-assignee-input:focus {
    outline: none;
    border-color: var(--primary-color, #6366f1);
    background: white;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.batch-assignee-input::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

/* Total count badge in claim selector modal */
.claim-selector-total-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-left: 0.5rem;
}

/* ===== Batch View Toggle (Card / List) ===== */
.batch-view-toggle {
    display: inline-flex;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    margin-right: 0.5rem;
}

.batch-view-btn {
    border: none;
    background: white;
    color: var(--text-muted);
    padding: 0.4rem 0.65rem;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.15s;
    line-height: 1;
}

.batch-view-btn:hover {
    background: #f1f5f9;
    color: var(--text-primary);
}

.batch-view-btn.active {
    background: var(--primary-color, #6366f1);
    color: white;
}

/* ===== Batch List View ===== */
.batch-claims-list-view {
    padding: 0 1rem 1rem;
}

.batch-list-header-row {
    display: grid;
    grid-template-columns: 1.5fr 1.2fr 1fr 0.8fr 1fr 0.7fr 0.8fr 1fr;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--bg-primary, white);
    z-index: 1;
}

.batch-list-row {
    display: grid;
    grid-template-columns: 1.5fr 1.2fr 1fr 0.8fr 1fr 0.7fr 0.8fr 1fr;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    align-items: center;
    font-size: 0.82rem;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.12s;
}

.batch-list-row:hover {
    background: #f8fafc;
}

.batch-list-row[data-status="active"],
.batch-list-row[data-status="calling"] {
    background: rgba(59, 130, 246, 0.04);
}

.batch-list-row[data-status="completed"] {
    opacity: 0.65;
}

.batch-list-col-patient {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.batch-list-col-insurance,
.batch-list-col-claim,
.batch-list-col-dos,
.batch-list-col-phone,
.batch-list-col-amount {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.batch-list-col-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.batch-list-col-actions .btn-xs {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    white-space: nowrap;
}

/* Button info style for status management */
.btn-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
}

.btn-info:hover {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    color: white;
}

/* ================================================================
   Speech Queue Floating Panel
   ================================================================ */

.speech-queue-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    max-height: 400px;
    background: #1e1b4b;
    border: 2px solid #6366f1;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3), 0 2px 8px rgba(0,0,0,0.3);
    z-index: 10002;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: inherit;
}

.speech-queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    cursor: move;
}

.speech-queue-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.speech-queue-title i {
    font-size: 0.9rem;
}

.speech-queue-actions {
    display: flex;
    gap: 4px;
}

.speech-queue-actions .btn {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    padding: 3px 7px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.7rem;
    transition: background 0.2s;
}

.speech-queue-actions .btn:hover {
    background: rgba(255,255,255,0.3);
}

.speech-queue-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    max-height: 320px;
}

.speech-queue-empty {
    text-align: center;
    color: #a5b4fc;
    font-size: 0.8rem;
    padding: 16px 8px;
    font-style: italic;
}

.speech-queue-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    margin-bottom: 4px;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.3s ease;
}

.speech-queue-item.speaking {
    background: rgba(250, 204, 21, 0.15);
    border-color: #eab308;
    animation: queueSpeakingPulse 1.2s ease-in-out infinite;
}

.speech-queue-item.done {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    opacity: 0.6;
}

.speech-queue-item.pending {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
}

@keyframes queueSpeakingPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.3); }
    50% { box-shadow: 0 0 12px 2px rgba(250, 204, 21, 0.2); }
}

.speech-queue-item-status {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.speech-queue-number {
    background: #6366f1;
    color: #fff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
}

.speech-queue-speaking-icon {
    color: #eab308;
    font-size: 0.9rem;
    animation: speakIconPulse 0.8s ease-in-out infinite alternate;
}

@keyframes speakIconPulse {
    from { opacity: 0.6; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1.1); }
}

.speech-queue-item .fa-check {
    color: #22c55e;
    font-size: 0.75rem;
}

.speech-queue-item-content {
    flex: 1;
    min-width: 0;
}

.speech-queue-item-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #a5b4fc;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.speech-queue-item-value {
    font-size: 0.8rem;
    color: #e0e7ff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.speech-queue-item-remove {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.7rem;
    opacity: 0.5;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.speech-queue-item-remove:hover {
    opacity: 1;
    background: rgba(239, 68, 68, 0.15);
}
