/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563EB;
    --primary-light: #3B82F6;
    --secondary-color: #6366F1;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --error-color: #EF4444;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F9FAFB;
    --bg-tertiary: #F3F4F6;
    --border-color: #E5E7EB;
    --border-light: #F3F4F6;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 14px;
}

/* App Loading Overlay */
.app-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    text-align: center;
    color: var(--text-secondary);
}

.spinner {
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Layout */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: width 0.3s ease;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar-header {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    box-sizing: border-box;
}

.sidebar.collapsed .sidebar-header {
    padding: 12px 10px;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
}




.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    font-size: 14px;
}

.sidebar-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    margin: 0 12px 4px 12px;
    border-radius: var(--radius-md);
}

.sidebar.collapsed .nav-item {
    gap: 0;
    padding: 12px;
    margin: 0 8px 4px 8px;
    justify-content: center;
}

.nav-text {
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .nav-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.nav-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--primary-color);
    color: white;
}

.nav-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-light);
}

.sidebar.collapsed .sidebar-footer {
    padding: 12px 8px;
}

.sidebar.collapsed .user-profile {
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.sidebar.collapsed .user-info {
    display: none;
}

.sidebar.collapsed .edit-account-btn {
    padding: 8px;
    justify-content: center;
}

.sidebar.collapsed .btn-text {
    display: none;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.user-role {
    font-size: 12px;
    color: var(--text-secondary);
}

.edit-account-btn {
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.edit-account-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Top Bar */
.top-bar {
    position: fixed;
    top: 0;
    left: 280px;
    right: 0;
    height: 60px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 24px;
    z-index: 999;
    transition: left 0.3s ease;
}

.sidebar.collapsed~.top-bar {
    left: 70px;
}

.app-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-title i {
    font-size: 20px;
}

/* Main Content */
.main-content {
    margin-left: 280px;
    min-height: 100vh;
    padding-top: 60px;
    transition: margin-left 0.3s ease;
}

.sidebar.collapsed~.top-bar~.main-content {
    margin-left: 70px;
}

.date-navigation {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-arrow {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.nav-arrow:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.date-tabs {
    display: flex;
    gap: 8px;
}

.date-tab {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-width: 80px;
}

.date-tab:hover {
    background: var(--bg-tertiary);
}

.date-tab.active {
    background: var(--primary-color);
    color: white;
}

.date-tab.today {
    border: 2px solid var(--primary-color);
}

.date-tab.today.active {
    border: 2px solid white;
}

.date-label {
    display: block;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.date-number {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-top: 2px;
}

/* Content Sections */
.content-section {
    display: none;
    padding: 32px;
}

.content-section.active {
    display: block;
}

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-container .date-navigation {
    margin-bottom: 32px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Chart Section */
.chart-section {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.chart-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-controls {
    display: flex;
    gap: 8px;
}

.chart-control-btn {
    padding: 6px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-control-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.chart-control-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.chart-content {
    height: 300px;
}

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.kpi-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.kpi-card:hover {
    box-shadow: var(--shadow-md);
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.kpi-header h3 {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-change {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
}

.kpi-change.positive {
    color: var(--success-color);
}

.kpi-change.negative {
    color: var(--error-color);
}

.kpi-change.neutral {
    color: var(--text-muted);
}

.kpi-change i {
    font-size: 10px;
}

.kpi-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

/* Recent Transcriptions */
.recent-transcriptions {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.recent-transcriptions h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.transcription-slots {
    display: flex;
    gap: 20px;
}

.time-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 60px;
}

.time-slot {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.transcription-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
}

.transcription-item {
    height: 60px;
    border-radius: var(--radius-md);
    padding: 8px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.transcription-item.audio {
    background: #FEF3C7;
    color: #92400E;
    border: 1px solid #FDE68A;
}

.transcription-item.video {
    background: #DBEAFE;
    color: #1E40AF;
    border: 1px solid #BFDBFE;
}

.transcription-item.meeting {
    background: #F3E8FF;
    color: #7C3AED;
    border: 1px solid #DDD6FE;
}

.transcription-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Upload Section */
.upload-container {
    max-width: 800px;
    margin: 0 auto;
}

.upload-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.upload-header {
    text-align: center;
    margin-bottom: 32px;
}

.upload-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.upload-header p {
    color: var(--text-secondary);
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-xl);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.upload-icon {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.upload-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.upload-content p {
    color: var(--text-secondary);
}

.upload-controls {
    margin-top: 24px;
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
}

/* History Section */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.history-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.history-controls {
    display: flex;
    gap: 12px;
}

.search-input,
.filter-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
}

/* Material Design 3 Dropdown */
.lead-filter-container {
    position: relative;
    min-width: 280px;
    margin-right: 12px;
}

.md-dropdown {
    position: relative;
    display: inline-block;
    width: 100%;
}

.md-dropdown-trigger {
    width: 100%;
    min-height: 56px;
    padding: 8px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.md-dropdown-trigger:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-light);
}

.md-dropdown-trigger.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.dropdown-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 20px);
}

.dropdown-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    transition: transform 0.2s ease;
    font-size: 12px;
}

.md-dropdown-trigger.active .dropdown-icon {
    transform: translateY(-50%) rotate(180deg);
}

.md-dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-height: 400px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
}

.md-dropdown-content.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-secondary);
}

.dropdown-search {
    position: relative;
    margin-bottom: 12px;
}

.dropdown-search-input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    font-size: 14px;
    color: var(--text-primary);
}

.dropdown-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.dropdown-search .fas {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 12px;
}

.dropdown-actions {
    display: flex;
    gap: 8px;
}

.dropdown-action-btn {
    flex: 1;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.dropdown-action-btn:hover {
    background: var(--bg-primary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.dropdown-options {
    max-height: 280px;
    overflow-y: auto;
    padding: 8px 0;
}

.dropdown-option {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid transparent;
}

.dropdown-option:hover {
    background: var(--bg-secondary);
}

.dropdown-option.selected {
    background: rgba(37, 99, 235, 0.08);
    border-color: var(--border-light);
}

.dropdown-option-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 3px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.dropdown-option.selected .dropdown-option-checkbox {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.dropdown-option-checkbox .fas {
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.dropdown-option.selected .dropdown-option-checkbox .fas {
    opacity: 1;
}

.dropdown-option-text {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
    font-family: 'Roboto Mono', monospace;
}

.dropdown-loading {
    padding: 24px;
    text-align: center;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.dropdown-loading .fas {
    font-size: 18px;
    color: var(--primary-color);
}

.dropdown-no-results {
    padding: 24px;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
}

/* Scrollbar styling for dropdown */
.dropdown-options::-webkit-scrollbar {
    width: 6px;
}

.dropdown-options::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.dropdown-options::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.dropdown-options::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.search-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.history-table {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.history-table table {
    width: 100%;
    border-collapse: collapse;
}

.history-table th {
    background: var(--bg-tertiary);
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.history-table td {
    padding: 6px 12px;
    border-top: 1px solid var(--border-light);
    vertical-align: middle;
    font-size: 13px;
    line-height: 1.3;
}

.history-table tr:hover {
    background: var(--bg-secondary);
}

.file-name.clickable {
    cursor: pointer;
    color: var(--primary-color);
    transition: color 0.2s ease;
}

.file-name.clickable:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.date-time-cell {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Settings Section */
.settings-header {
    margin-bottom: 32px;
}

.settings-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.settings-header p {
    color: var(--text-secondary);
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.settings-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.settings-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.setting-item {
    margin-bottom: 20px;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-item label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 8px;
}

.setting-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.setting-header label {
    margin-bottom: 0;
}

.setting-description {
    margin-bottom: 8px;
}

.setting-description small {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.4;
}

.setting-input,
.setting-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.setting-input:focus,
.setting-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.setting-textarea {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Fira Mono', monospace;
    line-height: 1.5;
    resize: vertical;
    min-height: 120px;
}

/* Prompt Editor Styles */
.prompt-card {
    grid-column: 1 / -1;
}

.prompt-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding: 8px 12px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: #1d4ed8;
}

.prompt-info code {
    background: rgba(59, 130, 246, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Fira Mono', monospace;
    font-weight: 600;
}

.prompt-validation {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: #dc2626;
    animation: shake 0.5s ease-in-out;
}

.prompt-validation code {
    background: rgba(239, 68, 68, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Fira Mono', monospace;
    font-weight: 600;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

    75% {
        transform: translateX(4px);
    }
}

.setting-item .btn {
    margin-right: 12px;
}

.setting-item .btn:last-child {
    margin-right: 0;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: all 0.3s ease;
    border-radius: 12px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    top: 3px;
    background-color: white;
    transition: all 0.3s ease;
    border-radius: 9px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

input:checked+.slider {
    background-color: var(--primary-color);
}

input:checked+.slider:before {
    transform: translateX(24px);
}

.slider:hover {
    background-color: #94a3b8;
}

input:checked+.slider:hover {
    background-color: var(--primary-light);
}

/* Status Indicators */
.api-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success-color);
}

.status-text {
    font-size: 14px;
    color: var(--success-color);
    font-weight: 500;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    max-width: 800px;
    max-height: 90vh;
    width: 90%;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    gap: 20px;
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
}

.modal-tabs {
    display: flex;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.modal-tabs .tab-button {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    min-width: 0;
    flex: 1;
    justify-content: center;
}

.modal-tabs .tab-button:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-tabs .tab-button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.modal-tabs .tab-button i {
    font-size: 12px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

/* Enhanced Modal Styles */
.large-modal {
    width: 95vw;
    height: 90vh;
    max-width: none;
    max-height: none;
    display: flex;
    flex-direction: column;
}

.large-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    min-height: 0;
    /* Allows flex child to shrink */
}

.call-analysis-content {
    padding: 12px;
    height: 100%;
}

.call-metrics-content {
    padding: 12px;
    height: 100%;
}

.recording-info-content {
    padding: 12px;
}

.large-modal .modal-footer {
    flex-shrink: 0;
    /* Prevents footer from shrinking */
    margin-top: auto;
    /* Pushes footer to bottom */
}

/* Ensure segments display properly in modal */
.modal-body .segments-container {
    max-height: none;
    overflow-y: visible;
}

/* Segment count styling moved to proper location in CSS */

.modal-body .segment-item {
    margin-bottom: 8px;
    min-height: auto;
}

.modal-body .detail-card .card-content {
    max-height: 600px;
    overflow-y: auto;
}

.loading-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.loading-state i {
    font-size: 24px;
    margin-bottom: 12px;
    animation: spin 1s linear infinite;
}

.loading-state p {
    font-size: 16px;
}

.error-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--error-color);
}

.error-state i {
    font-size: 24px;
    margin-bottom: 12px;
}

.transcription-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease;
}

.detail-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.detail-card .card-header {
    background: linear-gradient(to right, var(--bg-tertiary), var(--bg-secondary));
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.detail-card .card-header h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.detail-card .card-header i {
    color: var(--primary-color);
    font-size: 18px;
}

.segment-count {
    background: var(--primary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.detail-card .card-content {
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Segments Styling */
.segments-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 8px;
}

.segments-container::-webkit-scrollbar {
    width: 6px;
}

.segments-container::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.segments-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.segments-container::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.segment-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: all 0.2s ease;
    position: relative;
    min-height: fit-content;
    overflow: visible;
}

.segment-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.segment-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
    transform: translateX(2px);
}

.segment-item:hover::before {
    transform: scaleY(1);
}

.segment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 12px;
    flex-wrap: wrap;
}

.speaker-label {
    background: var(--primary-color);
    color: white;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.speaker-label.speaker1,
.speaker-label.speaker-1 {
    background: #2563EB;
}

.speaker-label.speaker2,
.speaker-label.speaker-2 {
    background: #7C3AED;
}

.speaker-label.speaker3,
.speaker-label.speaker-3 {
    background: #059669;
}

.speaker-label.speaker4,
.speaker-label.speaker-4 {
    background: #DC2626;
}

.timestamp-label {
    color: var(--text-secondary);
    font-size: 12px;
    font-family: ui-monospace, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
    background: var(--bg-tertiary);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.speaker-label.speaker1 {
    background: var(--primary-color);
}

.speaker-label.speaker2 {
    background: var(--secondary-color);
}

.speaker-label.speaker3 {
    background: var(--success-color);
}

.speaker-label.speaker4 {
    background: var(--warning-color);
}

.timestamp-label {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 500;
    font-family: 'Courier New', monospace;
}

.segment-text {
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    display: block;
}

.segment-text.plain {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.segment-text.plain:last-child {
    border-bottom: none;
}

.transcription-text {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    line-height: 1.6;
    white-space: pre-wrap;
    font-family: ui-monospace, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
    font-size: 13px;
}

/* Analysis Grid */
.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.analysis-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: all 0.2s ease;
}

.analysis-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.analysis-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.analysis-header i {
    color: var(--primary-color);
    font-size: 14px;
}

.analysis-header h5 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.analysis-content {
    color: var(--text-primary);
}

.analysis-text {
    margin: 0;
    line-height: 1.5;
    font-size: 14px;
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.analysis-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: all 0.2s ease;
}

.analysis-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.analysis-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.analysis-list li {
    position: relative;
    padding: 8px 0 8px 20px;
    line-height: 1.5;
    font-size: 14px;
    color: var(--text-primary);
}

.analysis-list li::before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 4px;
    font-size: 16px;
}

.badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

.sentiment-badge {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sentiment-badge.positive {
    background: #D1FAE5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.sentiment-badge.negative {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.sentiment-badge.neutral {
    background: #F3F4F6;
    color: #374151;
    border: 1px solid #D1D5DB;
}

.sentiment-badge.mixed {
    background: #FEF3C7;
    color: #92400E;
    border: 1px solid #FDE68A;
}

.no-data,
.no-segments,
.no-transcription,
.no-analysis {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 500;
    z-index: 1001;
    min-width: 300px;
    animation: slideIn 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.notification.success {
    background: linear-gradient(135deg, var(--success-color), #059669);
}

.notification.error {
    background: linear-gradient(135deg, var(--error-color), #dc2626);
}

.notification button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.notification button:hover {
    background: rgba(255, 255, 255, 0.2);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Action Buttons */
.action-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0 2px;
    min-width: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

/* Status Badges */
.status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status.completed {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.status.processing {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.status.failed {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* Method Badges */
.method-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid;
}

.method-badge.direct {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border-color: rgba(34, 197, 94, 0.2);
}

.method-badge.traditional {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border-color: rgba(59, 130, 246, 0.2);
}

/* File Name Styling */
.file-name {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Fira Mono', monospace;
    color: var(--primary-color);
    font-weight: 500;
}

/* No Data Message */
.no-data {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 40px 20px;
}

/* API Documentation Section */
.api-container {
    padding: 0;
    max-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.api-docs-container {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    min-height: calc(100vh - 80px);
    border: 1px solid var(--border-color);
    flex: 1;
}

/* Scalar API Reference Customization */
.api-docs-container #scalar-api-reference {
    display: block;
    width: 100%;
    height: 100%;
    min-height: calc(100vh - 80px);
    position: relative;
}

/* Ensure proper layout for Scalar sidebar */
.api-docs-container {
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Override Scalar theme colors to match our theme */
#scalar-api-reference {
    --scalar-color-1: var(--primary-color);
    --scalar-color-2: var(--secondary-color);
    --scalar-color-3: var(--success-color);
    --scalar-color-accent: var(--primary-color);
    --scalar-background-1: #ffffff;
    --scalar-background-2: #f8f9fa;
    --scalar-background-3: #e9ecef;
    --scalar-border-color: var(--border-color);
    --scalar-radius: var(--radius-md);
    --scalar-radius-lg: var(--radius-lg);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .kpi-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .content-section {
        padding: 16px;
    }

    .kpi-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .date-tabs {
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .date-tabs::-webkit-scrollbar {
        display: none;
    }

    .transcription-slots {
        flex-direction: column;
        gap: 12px;
    }

    .time-column {
        flex-direction: row;
        overflow-x: auto;
    }

    .transcription-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .api-container {
        padding: 0;
    }

    .api-docs-container {
        min-height: calc(100vh - 120px);
    }
}

/* Modern Date Picker Styles */
.modern-date-picker {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.date-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.date-picker-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
}

.date-picker-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quick-date-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-date-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.quick-date-btn:active {
    transform: translateY(1px);
}

.date-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.modern-date-input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px;
}

.modern-date-input:hover {
    border-color: var(--primary-color);
}

.modern-date-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.date-icon {
    position: absolute;
    right: 12px;
    color: var(--text-muted);
    pointer-events: none;
    font-size: 14px;
}

.selected-date-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.date-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.selected-date-text {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .date-picker-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .date-picker-controls {
        flex-wrap: wrap;
        gap: 8px;
    }

    .quick-date-btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .modern-date-input {
        min-width: 120px;
        font-size: 13px;
    }
}

/* Efficiency Badge Styles */
.efficiency-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    min-width: 50px;
}

.efficiency-badge.excellent {
    background: #D1FAE5;
    color: #065F46;
    border: 1px solid #10B981;
}

.efficiency-badge.good {
    background: #DBEAFE;
    color: #1E40AF;
    border: 1px solid #3B82F6;
}

.efficiency-badge.fair {
    background: #FEF3C7;
    color: #92400E;
    border: 1px solid #F59E0B;
}

.efficiency-badge.poor {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #EF4444;
}

.efficiency-badge.neutral {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

/* Enhanced History Controls */
.history-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 16px;
}

.search-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    min-width: 250px;
}

.search-box .search-input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--bg-primary);
    transition: border-color 0.2s ease;
}

.search-box .search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    min-width: 120px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.results-info {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Pagination Styles */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 16px 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    gap: 16px;
}

.pagination-info {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-numbers {
    display: flex;
    gap: 4px;
}

.page-number {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 32px;
    text-align: center;
}

.page-number:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
}

.page-number.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-size-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.page-size-select {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
}

.page-size-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Mobile responsive adjustments for history controls */
@media (max-width: 768px) {
    .history-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .search-filters {
        flex-direction: column;
        gap: 8px;
    }

    .search-box {
        min-width: auto;
    }

    .pagination-controls {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .pagination-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .page-size-selector {
        justify-content: center;
    }
}

/* Modal Tab Navigation Styles */
.tab-navigation {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin: -24px -24px 20px -24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 8px 16px 0 16px;
    position: sticky;
    top: -24px;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tab-button {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    margin: 8px 4px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-button:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.tab-button.active {
    background: var(--bg-primary);
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: -2px;
}

.tab-button i {
    font-size: 16px;
}

/* Tab Content Styles */
.transcription-details {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.tab-content {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
    height: 100%;
    overflow-y: auto;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Recording Information Styles */
.recording-info-content {
    padding: 20px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    max-width: none;
}

.info-section {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
}

.info-section h5 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.info-section h5 i {
    color: var(--primary-color);
    font-size: 16px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-light);
}

.info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.info-label {
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 100px;
    flex-shrink: 0;
    font-size: 13px;
}

.info-value {
    color: var(--text-primary);
    font-weight: 500;
    word-break: break-word;
    text-align: right;
    font-size: 13px;
}

/* AI Analysis Tab Styles */
.ai-analysis-content {
    padding: 20px;
}

.call-analysis-content {
    padding: 20px;
    height: 100%;
}

.call-metrics-content {
    padding: 20px;
    height: 100%;
}

.analysis-columns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

.analysis-2-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
}

.analysis-single-column {
    display: block;
    width: 100%;
}

.analysis-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (max-width: 1200px) {
    .analysis-2-columns {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.analysis-4-columns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 16px;
    align-items: start;
}

@media (max-width: 1400px) {
    .analysis-4-columns {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .analysis-4-columns {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.analysis-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: fit-content;
}

.analysis-section-container {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: visible;
    min-height: 0;
    flex: 0 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.section-header {
    background: var(--bg-secondary);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-header i {
    color: var(--primary-color);
    font-size: 16px;
}

.section-header h5 {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
    margin: 0;
}

.section-fields {
    padding: 12px 16px;
    overflow: visible;
}

.field-item {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.field-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.field-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.field-header i {
    color: var(--text-secondary);
    font-size: 14px;
    width: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.field-label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.field-content {
    margin-left: 24px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Horizontal Bar Charts */
.horizontal-bar-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.score-info {
    min-width: 50px;
    font-weight: 600;
    color: var(--text-primary);
}

.score-value {
    font-size: 16px;
}

.score-max {
    font-size: 14px;
    color: var(--text-secondary);
}

.horizontal-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.bar-fill.excellent {
    background: linear-gradient(90deg, var(--success-color), #059669);
}

.bar-fill.good {
    background: linear-gradient(90deg, #10B981, #047857);
}

.bar-fill.fair {
    background: linear-gradient(90deg, var(--warning-color), #D97706);
}

.bar-fill.poor {
    background: linear-gradient(90deg, var(--error-color), #DC2626);
}

/* Percentage Display */
.percentage-display {
    display: flex;
    align-items: center;
    gap: 12px;
}

.percentage-value {
    min-width: 40px;
    font-weight: 600;
    color: var(--text-primary);
}

.percentage-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.percentage-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Compact Analysis Components */
.analysis-list-compact {
    list-style: none;
    margin: 0;
}

.analysis-list-compact li {
    padding: 4px 0;
    color: var(--text-primary);
    font-size: 13px;
    position: relative;
    padding-left: 16px;
}

.analysis-list-compact li:before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.badge-container-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.badge-small {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.sentiment-badge-small {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.sentiment-badge-small.positive {
    background: #DCFCE7;
    color: #166534;
}

.sentiment-badge-small.negative {
    background: #FEE2E2;
    color: #991B1B;
}

.sentiment-badge-small.neutral {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.sentiment-badge-small.won {
    background: #DCFCE7;
    color: #166534;
}

.sentiment-badge-small.lost {
    background: #FEE2E2;
    color: #991B1B;
}

.sentiment-badge-small.delayed {
    background: #FEF3C7;
    color: #92400E;
}

.sentiment-badge-small.yes {
    background: #DCFCE7;
    color: #166534;
}

.sentiment-badge-small.no {
    background: #FEE2E2;
    color: #991B1B;
}

.analysis-text-compact {
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.4;
}

.number-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 16px;
}

.no-data {
    color: var(--text-muted);
    font-style: italic;
    font-size: 12px;
}

/* Compact Call Transcription Tab Styles */
.call-transcription-content {
    padding: 16px;
    background: #ffffff;
}

.transcription-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.participants-section {
    flex: 1;
}

.participants-title {
    color: #1f2937;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.participants-title i {
    color: #3b82f6;
    font-size: 14px;
}

.participants-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.participant-card {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #f9fafb;
    border-radius: 6px;
    border-left: 3px solid;
    transition: all 0.2s ease;
}

.participant-card:hover {
    background: #f3f4f6;
}

.participant-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.participant-info {
    flex: 1;
}

.participant-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 12px;
}

.participant-role {
    font-size: 10px;
    color: #6b7280;
}

.transcript-stats {
    display: flex;
    gap: 16px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #f9fafb;
    border-radius: 6px;
}

.stat-label {
    font-size: 10px;
    color: #6b7280;
    text-transform: uppercase;
    font-weight: 500;
}

.stat-value {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
}

/* Compact Single-Line Transcription Styles */
.transcription-timeline {
    max-height: 500px;
    overflow-y: auto;
    padding: 8px;
    background: #fafafa;
    border-radius: 6px;
}

/* Single-line segment display */
.segments-compact-list {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 12px;
}

.segment-single-line {
    display: flex;
    align-items: baseline;
    padding: 4px 8px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.1s ease;
    white-space: nowrap;
    overflow: hidden;
}

.segment-single-line:hover {
    background: #f9fafb;
}

.segment-single-line:last-child {
    border-bottom: none;
}

.segment-time {
    flex-shrink: 0;
    width: 50px;
    font-weight: 500;
    font-size: 11px;
    margin-right: 8px;
}

.segment-time-range {
    flex-shrink: 0;
    width: 100px;
    font-weight: 500;
    font-size: 10px;
    margin-right: 8px;
    color: #6b7280;
    text-align: left;
}

.segment-speaker {
    flex-shrink: 0;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 600;
    font-size: 10px;
    margin-right: 10px;
    min-width: 60px;
    text-align: center;
}

.segment-text-inline {
    flex: 1;
    color: #374151;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    line-height: 1.4;
}

/* Expand on hover for full text */
.segment-single-line:hover .segment-text-inline {
    white-space: normal;
    word-wrap: break-word;
}

.segments-timeline {
    position: relative;
}

.timeline-segment {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    position: relative;
}

.timeline-connector {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 24px;
    flex-shrink: 0;
}

.timeline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    z-index: 2;
    position: relative;
    margin-top: 6px;
}

.timeline-line {
    width: 1px;
    height: calc(100% + 12px);
    background: #e5e7eb;
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
}

.segment-content {
    flex: 1;
    background: white;
    border-left: 2px solid;
    border-radius: 6px;
    padding: 10px 12px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.segment-content:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.segment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.speaker-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.speaker-badge i {
    font-size: 10px;
}

.speaker-label {
    color: inherit;
}

.segment-timestamp {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: #9ca3af;
}

.segment-timestamp i {
    font-size: 10px;
}

.segment-message {
    color: #374151;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Different styles for agent vs customer */
.agent-segment .segment-content {
    background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);
}

.customer-segment .segment-content {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

/* Styled text for raw transcription */
.transcription-text-styled {
    padding: 20px;
}

.transcript-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
}

.transcript-paragraph {
    color: #374151;
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 16px;
    text-align: justify;
}

.transcript-paragraph:last-child {
    margin-bottom: 0;
}

/* Compact inline speaker format for transcripts */
.transcript-line {
    margin-bottom: 8px;
    padding: 8px 10px;
    background: #fafafa;
    border-left: 2px solid #3b82f6;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.transcript-line:hover {
    background: #f3f4f6;
    transform: translateX(2px);
}

.inline-speaker {
    font-weight: 600;
    color: #1f2937;
    display: inline-block;
    margin-right: 6px;
    padding: 2px 6px;
    background: #dbeafe;
    border-radius: 3px;
    font-size: 11px;
}

.inline-text {
    color: #4b5563;
    line-height: 1.4;
    font-size: 12px;
}

.no-transcript {
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    padding: 40px;
    font-size: 14px;
}

/* Scrollbar styling for timeline */
.transcription-timeline::-webkit-scrollbar {
    width: 8px;
}

.transcription-timeline::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 4px;
}

.transcription-timeline::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.transcription-timeline::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.transcription-body {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.segments-compact {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.segment-compact {
    border-left: 3px solid var(--primary-color);
    padding-left: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.segment-compact:last-child {
    border-bottom: none;
}

.segment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.speaker-name {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 13px;
}

.timestamp {
    color: var(--text-muted);
    font-size: 12px;
    font-family: 'Monaco', 'Menlo', monospace;
}

.segment-text {
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 14px;
}

.transcription-text-compact pre {
    white-space: pre-wrap;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-primary);
    margin: 0;
}

/* Mobile Responsive */
@media (max-width: 1200px) {
    .analysis-columns {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .analysis-4-columns {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .large-modal {
        width: 98vw;
        height: 95vh;
    }
}

@media (max-width: 768px) {
    .analysis-columns {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .analysis-2-columns {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .analysis-4-columns {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .large-modal {
        width: 100vw;
        height: 100vh;
        margin: 0;
    }

    .tab-navigation {
        margin: -24px -20px 20px -20px;
        padding: 8px 12px 0 12px;
    }

    .tab-button {
        font-size: 12px;
        padding: 10px 8px;
    }

    .tab-button i {
        display: none;
    }

    .horizontal-bar-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .transcription-header {
        flex-direction: column;
        gap: 12px;
    }
}

/* Enhanced Search Styles */
.enhanced-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-icon {
    background: transparent;
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary, #666);
}

.btn-icon:hover {
    background: var(--primary-color, #4CAF50);
    color: white;
    border-color: var(--primary-color, #4CAF50);
}

.advanced-search-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 8px;
    padding: 20px;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.advanced-search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.search-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.search-field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary, #666);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-field input,
.search-field select {
    padding: 8px 12px;
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.search-field input:focus,
.search-field select:focus {
    outline: none;
    border-color: var(--primary-color, #4CAF50);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.date-range {
    display: flex;
    gap: 8px;
}

.date-range input {
    flex: 1;
}

.advanced-search-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid var(--border-color, #e0e0e0);
}

.search-highlight {
    background: #fff3cd;
    color: #856404;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 12px;
}

.search-result-highlight {
    background: yellow;
    font-weight: bold;
    padding: 2px 4px;
    border-radius: 2px;
}

/* Objections Section */
.objection-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 12px;
    border-left: 4px solid var(--warning-color);
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.objection-item.resolved {
    border-left-color: var(--success-color);
}

.objection-item.unresolved {
    border-left-color: var(--error-color);
}

.objection-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.objection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.objection-status i.fa-check-circle {
    color: var(--success-color);
}

.objection-status i.fa-exclamation-circle {
    color: var(--error-color);
}

.objection-category {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    text-transform: uppercase;
    white-space: nowrap;
}

.objection-number {
    color: var(--text-muted);
    font-size: 12px;
    flex-shrink: 0;
}

.objection-text,
.agent-response {
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.objection-text:last-child,
.agent-response:last-child {
    margin-bottom: 0;
}

.objection-text strong,
.agent-response strong {
    color: var(--text-primary);
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

/* Next Steps Section */
.next-step-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 12px;
    border-left: 4px solid var(--primary-color);
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.next-step-item.priority-high {
    border-left-color: var(--error-color);
}

.next-step-item.priority-medium {
    border-left-color: var(--warning-color);
}

.next-step-item.priority-low {
    border-left-color: var(--success-color);
}

.step-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.step-owner {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.step-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.priority-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    white-space: nowrap;
}

.priority-badge.priority-high {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

.priority-badge.priority-medium {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.priority-badge.priority-low {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.due-date {
    color: var(--text-muted);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.step-action,
.step-rationale {
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.step-action:last-child,
.step-rationale:last-child {
    margin-bottom: 0;
}

.step-action strong,
.step-rationale strong {
    color: var(--text-primary);
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.step-action,
.step-rationale {
    margin-bottom: 6px;
    font-size: 13px;
    line-height: 1.4;
}

.step-action strong,
.step-rationale strong {
    color: var(--text-primary);
    font-weight: 600;
}

@media (max-width: 768px) {
    .advanced-search-panel {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 500px;
        max-height: 80vh;
        overflow-y: auto;
    }

    .advanced-search-grid {
        grid-template-columns: 1fr;
    }
}