/**
 * dashboard.css
 * Styles for the Analytics Dashboard page.
 * Version: 2.2.0
 *
 * Changes (v2.2.0):
 *   - REMOVED: .realtime-notification and child class styles (light theme, lines 929-990).
 *   - REMOVED: .dark-theme .realtime-notification and child dark overrides (lines 1622-1643).
 *              Corresponds to removal of showNewAnalysisNotification() in dashboard.js v2.2.0.
 *
 * Load order: after navbar.css, theme.css, loading-spinner.css
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f8fafc;
    min-height: 100vh;
    color: #1e293b;
}

/* Navigation */
.nav {
    background: white;
    padding: 16px 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.nav-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #0EA5E9 0%, #2563EB 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
}

.nav-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-link {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: #0EA5E9;
}

.settings-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    transition: all 0.2s;
}

.settings-link:hover {
    background: #f1f5f9;
}

.settings-link svg {
    color: #64748b;
    transition: color 0.2s;
}

.settings-link:hover svg {
    color: #0EA5E9;
}

/* Main Container */
.container {
    padding-top: 24px;
    padding-bottom: 24px;
    /* Uses .app-width from theme.css for horizontal constraints */
}

/* Page Header - Standardized */
.page-header {
    background: var(--bg-card);
    padding: 32px 0;
    border-bottom: 1px solid var(--border-primary);
    margin-bottom: 24px;
}

.page-header-content {
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    /* Uses .app-width from theme.css for horizontal constraints */
}

.page-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--page-icon-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.page-header p {
    color: var(--text-tertiary);
    font-size: 15px;
}

/* Stats Cards Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.stat-label {
    font-size: 13px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
}

.stat-value.score {
    color: #0EA5E9;
}

.stat-value.grade-a { color: #10B981; }
.stat-value.grade-b { color: #0EA5E9; }
.stat-value.grade-c { color: #F59E0B; }
.stat-value.grade-d { color: #F97316; }
.stat-value.grade-f { color: #EF4444; }

.stat-change {
    font-size: 13px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-change.positive { color: #10B981; }
.stat-change.negative { color: #EF4444; }

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 1024px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

.chart-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.chart-card.full-width {
    grid-column: 1 / -1;
}

/* Collapsible Score Trend Section */
.chart-card.collapsible .chart-header {
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
    margin: -24px -24px 0 -24px;
    padding: 24px;
    border-radius: 16px 16px 0 0;
}

.chart-card.collapsible .chart-header:hover {
    background: rgba(14, 165, 233, 0.05);
}

.chart-card.collapsible.collapsed .chart-header {
    margin-bottom: 0;
    border-radius: 16px;
}

.collapse-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.2);
    color: #0EA5E9;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.collapse-toggle:hover {
    background: rgba(14, 165, 233, 0.2);
    border-color: rgba(14, 165, 233, 0.4);
    transform: scale(1.05);
}

.collapse-toggle svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.chart-card.collapsible.collapsed .collapse-toggle svg {
    transform: rotate(-90deg);
}

.collapsible-content {
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.3s ease-out, padding 0.3s ease-out;
    max-height: 400px;
    opacity: 1;
}

.chart-card.collapsible.collapsed .collapsible-content {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
}

.collapse-hint {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 400;
    margin-left: 12px;
    padding: 4px 10px;
    background: rgba(148, 163, 184, 0.1);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.chart-card.collapsible:not(.collapsed) .collapse-hint {
    opacity: 0;
    width: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.chart-subtitle {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
}

.chart-container {
    position: relative;
    height: 300px;
}

.chart-container.small {
    height: 250px;
}

/* Recent Analyses Table */
.table-container {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow-x: auto;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}

.data-table tr:hover {
    background: #f8fafc;
}

.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
}

.score-badge.high { background: #d1fae5; color: #059669; }
.score-badge.medium { background: #fef3c7; color: #d97706; }
.score-badge.low { background: #fee2e2; color: #dc2626; }

.grade-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
}

.grade-badge.a { background: #d1fae5; color: #059669; }
.grade-badge.b { background: #dbeafe; color: #2563eb; }
.grade-badge.c { background: #fef3c7; color: #d97706; }
.grade-badge.d { background: #ffedd5; color: #ea580c; }
.grade-badge.f { background: #fee2e2; color: #dc2626; }

/* Filter Controls */
.filters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: #0EA5E9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Meeting Select Filter Styles */
.meeting-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.meeting-filter {
    min-width: 280px;
    max-width: 400px;
    padding-right: 36px;
    background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);
    border: 2px solid #e2e8f0;
    font-weight: 500;
    transition: all 0.2s ease;
}

.meeting-filter:hover {
    border-color: #0EA5E9;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.15);
}

.meeting-filter:focus {
    border-color: #0EA5E9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.meeting-filter.has-selection {
    background: linear-gradient(135deg, #ecfeff 0%, #f0f9ff 100%);
    border-color: #0EA5E9;
}

.clear-meeting-btn {
    position: absolute;
    right: 28px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 2;
}

.clear-meeting-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Single Meeting View Indicator */
.single-meeting-indicator {
    display: none;
    background: linear-gradient(135deg, #0EA5E9 0%, #2563EB 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 16px;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
}

.single-meeting-indicator.visible {
    display: flex;
}

.single-meeting-indicator .meeting-icon {
    font-size: 20px;
}

.single-meeting-indicator .meeting-info {
    flex: 1;
}

.single-meeting-indicator .meeting-name {
    font-size: 16px;
    font-weight: 600;
}

.single-meeting-indicator .meeting-meta {
    font-size: 12px;
    opacity: 0.85;
}

.single-meeting-indicator .view-all-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.single-meeting-indicator .view-all-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Loading State */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: #64748b;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #0EA5E9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px;
    color: #64748b;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.empty-text {
    font-size: 14px;
}

/* Insights Cards */
.insights-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

/* Objections & Improvements Row - 50/50 split */
.objections-improvements-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.insight-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.insight-card.half-width {
    min-height: 300px;
}

.insight-chart-card {
    display: flex;
    flex-direction: column;
}

.insight-chart-card .insight-list {
    flex: 1;
    overflow-y: auto;
    max-height: 250px;
}

.insight-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.insight-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.insight-icon.warning { background: #fef3c7; }
.insight-icon.success { background: #d1fae5; }
.insight-icon.info { background: #dbeafe; }

.insight-title {
    font-weight: 600;
    color: #1e293b;
}

.insight-list {
    list-style: none;
}

.insight-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.insight-list li:last-child {
    border-bottom: none;
}

.insight-text {
    flex: 1;
    line-height: 1.4;
    word-wrap: break-word;
    cursor: help;
}

.insight-text:hover {
    color: #0EA5E9;
}

.insight-count {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    flex-shrink: 0;
}

/* Refresh button */
.refresh-btn {
    background: #f1f5f9;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.refresh-btn:hover {
    background: #e2e8f0;
}

/* Filler Words Section */
.filler-words-grid {
    margin-bottom: 20px;
}

.filler-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.filler-stat {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.filler-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #92400e;
}

.filler-stat-label {
    font-size: 12px;
    color: #a16207;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.filler-table .rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 12px;
}

.filler-table .rank-badge.gold { background: #fef3c7; color: #92400e; }
.filler-table .rank-badge.silver { background: #f1f5f9; color: #475569; }
.filler-table .rank-badge.bronze { background: #ffedd5; color: #c2410c; }
.filler-table .rank-badge.normal { background: #f1f5f9; color: #64748b; }

.filler-word {
    font-weight: 600;
    color: #1e293b;
}

.filler-word-quote {
    color: #64748b;
    font-style: italic;
}

/* Filler count info tooltip - instant on hover */
.filler-info-tip {
    cursor: help;
    margin-left: 4px;
    color: #94a3b8;
    position: relative;
    display: inline-block;
}
.filler-info-tip .filler-info-tip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #f1f5f9;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    padding: 8px 12px;
    border-radius: 8px;
    white-space: normal;
    width: 240px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    transition: opacity 0.1s ease, visibility 0.1s ease;
    pointer-events: none;
}
.filler-info-tip .filler-info-tip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1e293b;
}
.filler-info-tip:hover .filler-info-tip-text {
    visibility: visible;
    opacity: 1;
}
.dark-theme .filler-info-tip .filler-info-tip-text {
    background: #f1f5f9;
    color: #1e293b;
}
.dark-theme .filler-info-tip .filler-info-tip-text::after {
    border-top-color: #f1f5f9;
}

.frequency-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    min-width: 100px;
}

.frequency-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #F59E0B, #EF4444);
    border-radius: 4px;
    transition: width 0.3s;
}

/* Speaker Badge Styles */
.speaker-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.speaker-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    background: #f1f5f9;
    color: #475569;
}

.speaker-badge .speaker-count {
    background: #e2e8f0;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
}

.speaker-badge.rep {
    background: #dbeafe;
    color: #1e40af;
}

.speaker-badge.rep .speaker-count {
    background: #bfdbfe;
    color: #1e40af;
}

.speaker-badge.prospect {
    background: #fef3c7;
    color: #92400e;
}

.speaker-badge.prospect .speaker-count {
    background: #fde68a;
    color: #92400e;
}

/* Speaker Summary Stats */
.speaker-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.speaker-stat-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 10px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.speaker-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    background: linear-gradient(135deg, #0EA5E9 0%, #2563EB 100%);
    color: white;
}

.speaker-avatar.prospect-avatar {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
}

.speaker-stat-info {
    flex: 1;
}

.speaker-stat-name {
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
}

.speaker-stat-count {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

/* Realtime Status Indicator */
.realtime-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f1f5f9;
    border-radius: 20px;
    font-size: 12px;
    color: #64748b;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
    transition: background 0.3s;
}

.realtime-status.connected .status-dot {
    background: #10B981;
    box-shadow: 0 0 6px #10B981;
}

.realtime-status.connected {
    color: #10B981;
}

.realtime-status.error .status-dot {
    background: #EF4444;
}

.realtime-status.error {
    color: #EF4444;
}

.status-text {
    font-weight: 500;
}

@media (max-width: 768px) {
    .realtime-status .status-text {
        display: none;
    }
    
    .realtime-status {
        padding: 6px 8px;
    }
}

@media (max-width: 768px) {
    .filler-summary {
        grid-template-columns: 1fr;
    }
}

/* Custom Date Range */
.custom-date-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-input {
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
}

.filter-input:focus {
    outline: none;
    border-color: #0EA5E9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.filter-spacer {
    flex: 1;
}

/* Export Buttons */
.export-btn {
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.export-btn:hover {
    background: #f8fafc;
    border-color: #0EA5E9;
    color: #0EA5E9;
}

/* Comparison Toggle */
.comparison-toggle {
    margin-bottom: 20px;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.toggle-label input {
    display: none;
}

.toggle-slider {
    width: 44px;
    height: 24px;
    background: #e2e8f0;
    border-radius: 12px;
    position: relative;
    transition: background 0.2s;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.toggle-label input:checked + .toggle-slider {
    background: #0EA5E9;
}

.toggle-label input:checked + .toggle-slider::after {
    transform: translateX(20px);
}

.toggle-text {
    font-size: 14px;
    color: #64748b;
}

/* Comparison Stats */
.comparison-stats {
    margin-bottom: 24px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.comparison-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    text-align: center;
}

.comparison-metric {
    font-size: 13px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.comparison-values {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

.comparison-current, .comparison-previous {
    text-align: center;
}

.comparison-label {
    display: block;
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 4px;
}

.comparison-value {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

.comparison-vs {
    color: #94a3b8;
    font-size: 12px;
}

.comparison-change {
    font-size: 14px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
}

.comparison-change.positive {
    background: #d1fae5;
    color: #059669;
}

.comparison-change.negative {
    background: #fee2e2;
    color: #dc2626;
}

.comparison-change.neutral {
    background: #f1f5f9;
    color: #64748b;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 1200px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-card.full-width {
        grid-column: 1;
    }
}

@media (max-width: 1024px) {
    .objections-improvements-row {
        grid-template-columns: 1fr;
    }
    
    .comparison-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    .nav {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .nav-links {
        width: 100%;
        justify-content: space-between;
        gap: 8px;
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-select, .filter-input {
        width: 100%;
    }
    
    .filter-spacer {
        display: none;
    }
    
    .custom-date-range {
        flex-direction: column;
        align-items: stretch;
    }
    
    .export-btn {
        width: 100%;
        justify-content: center;
    }
    
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .filler-summary {
        grid-template-columns: 1fr;
    }
    
    .page-title {
        font-size: 22px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .data-table {
        font-size: 12px;
    }
    
    .data-table th, .data-table td {
        padding: 10px 8px;
    }
    
    /* Hide some table columns on mobile */
    .data-table th:nth-child(4),
    .data-table td:nth-child(4),
    .data-table th:nth-child(8),
    .data-table td:nth-child(8) {
        display: none;
    }
}

@media (max-width: 480px) {
    .stats-row {
        grid-template-columns: 1fr;
    }
    
    .nav-brand {
        flex: 1;
    }
    
    .nav-title {
        font-size: 16px;
    }
    
    .chart-container {
        height: 220px;
    }
    
    .insight-card {
        padding: 16px;
    }
    
    .insight-card.half-width {
        min-height: auto;
    }
    
    /* Hide more table columns on small mobile */
    .data-table th:nth-child(3),
    .data-table td:nth-child(3),
    .data-table th:nth-child(7),
    .data-table td:nth-child(7) {
        display: none;
    }
}

/* ==================== DARK MODE ==================== */
body.dark-theme {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
}

.dark-theme .nav {
    background: #1e293b;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.dark-theme .nav-title {
    color: #f1f5f9;
}

.dark-theme .nav-link {
    color: #94a3b8;
}

.dark-theme .nav-link:hover,
.dark-theme .nav-link.active {
    color: #0EA5E9;
}

.dark-theme .settings-link:hover {
    background: #334155;
}

.dark-theme .settings-link svg {
    color: #94a3b8;
}

.dark-theme .settings-link:hover svg {
    color: #0EA5E9;
}

.dark-theme .page-title {
    color: #f1f5f9;
}

.dark-theme .page-subtitle {
    color: #94a3b8;
}

.dark-theme .stat-card,
.dark-theme .chart-card,
.dark-theme .insight-card,
.dark-theme .table-container {
    background: #1e293b;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.dark-theme .stat-label {
    color: #94a3b8;
}

.dark-theme .stat-value {
    color: #f1f5f9;
}

.dark-theme .chart-title,
.dark-theme .insight-title {
    color: #f1f5f9;
}

.dark-theme .chart-subtitle {
    color: #94a3b8;
}

/* Dark theme collapsible styles */
.dark-theme .chart-card.collapsible .chart-header:hover {
    background: rgba(56, 189, 248, 0.08);
}

.dark-theme .collapse-toggle {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.3);
    color: #38bdf8;
}

.dark-theme .collapse-toggle:hover {
    background: rgba(56, 189, 248, 0.25);
    border-color: rgba(56, 189, 248, 0.5);
}

.dark-theme .collapse-hint {
    color: #64748b;
    background: rgba(100, 116, 139, 0.15);
}

.dark-theme .filter-select {
    background: #334155;
    border-color: #475569;
    color: #f1f5f9;
}

.dark-theme .filter-select:focus {
    border-color: #0EA5E9;
}

/* Dark theme meeting filter */
.dark-theme .meeting-filter {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    border-color: #475569;
}

.dark-theme .meeting-filter:hover {
    border-color: #38bdf8;
}

.dark-theme .meeting-filter.has-selection {
    background: linear-gradient(135deg, #164e63 0%, #1e3a5f 100%);
    border-color: #38bdf8;
}

.dark-theme .single-meeting-indicator {
    background: linear-gradient(135deg, #0284c7 0%, #1d4ed8 100%);
}

.dark-theme .refresh-btn {
    background: #334155;
    color: #f1f5f9;
}

.dark-theme .refresh-btn:hover {
    background: #475569;
}

.dark-theme .data-table th {
    color: #94a3b8;
    border-bottom-color: #475569;
}

.dark-theme .data-table td {
    color: #e2e8f0;
    border-bottom-color: #334155;
}

.dark-theme .data-table tr:hover {
    background: #334155;
}

.dark-theme .insight-list li {
    border-bottom-color: #334155;
    color: #e2e8f0;
}

.dark-theme .insight-text {
    color: #e2e8f0;
}

.dark-theme .insight-text:hover {
    color: #38bdf8;
}

.dark-theme .insight-count {
    background: #334155;
    color: #94a3b8;
}

.dark-theme .insight-icon.warning { background: #78350f; }
.dark-theme .insight-icon.success { background: #064e3b; }
.dark-theme .insight-icon.info { background: #1e3a5f; }

.dark-theme .loading {
    color: #94a3b8;
}

.dark-theme .loading-spinner {
    border-color: #334155;
    border-top-color: #0EA5E9;
}

.dark-theme .empty-state {
    color: #94a3b8;
}

.dark-theme .empty-title {
    color: #f1f5f9;
}

/* Dark mode filler words */
.dark-theme .filler-stat {
    background: linear-gradient(135deg, #78350f 0%, #92400e 100%);
}

.dark-theme .filler-stat-value {
    color: #fef3c7;
}

.dark-theme .filler-stat-label {
    color: #fde68a;
}

.dark-theme .filler-word {
    color: #f1f5f9;
}

.dark-theme .filler-word-quote {
    color: #94a3b8;
}

.dark-theme .frequency-bar {
    background: #334155;
}

.dark-theme .filler-table .rank-badge.gold { background: #78350f; color: #fef3c7; }
.dark-theme .filler-table .rank-badge.silver { background: #334155; color: #e2e8f0; }
.dark-theme .filler-table .rank-badge.bronze { background: #7c2d12; color: #ffedd5; }
.dark-theme .filler-table .rank-badge.normal { background: #334155; color: #94a3b8; }

/* Dark mode speaker badges */
.dark-theme .speaker-badge {
    background: #334155;
    color: #e2e8f0;
}

.dark-theme .speaker-badge .speaker-count {
    background: #475569;
    color: #94a3b8;
}

.dark-theme .speaker-badge.rep {
    background: #1e3a5f;
    color: #93c5fd;
}

.dark-theme .speaker-badge.rep .speaker-count {
    background: #1e40af;
    color: #bfdbfe;
}

.dark-theme .speaker-badge.prospect {
    background: #78350f;
    color: #fde68a;
}

.dark-theme .speaker-badge.prospect .speaker-count {
    background: #92400e;
    color: #fef3c7;
}

.dark-theme .speaker-stat-card {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.dark-theme .speaker-stat-name {
    color: #f1f5f9;
}

.dark-theme .speaker-stat-count {
    color: #94a3b8;
}

.dark-theme .speaker-summary-grid {
    border-top-color: #334155;
}

.dark-theme .realtime-status {
    background: #334155;
    color: #94a3b8;
}

.dark-theme .realtime-status.connected {
    color: #10B981;
}

.dark-theme .realtime-status.error {
    color: #EF4444;
}

/* Dark mode new features */
.dark-theme .filter-input {
    background: #334155;
    border-color: #475569;
    color: #f1f5f9;
}

.dark-theme .export-btn {
    background: #334155;
    border-color: #475569;
    color: #f1f5f9;
}

.dark-theme .export-btn:hover {
    background: #475569;
    border-color: #0EA5E9;
    color: #0EA5E9;
}

.dark-theme .toggle-slider {
    background: #475569;
}

.dark-theme .toggle-text {
    color: #94a3b8;
}

.dark-theme .section-title {
    color: #f1f5f9;
}

.dark-theme .comparison-card {
    background: #1e293b;
}

.dark-theme .comparison-metric {
    color: #94a3b8;
}

.dark-theme .comparison-value {
    color: #f1f5f9;
}

.dark-theme .comparison-change.neutral {
    background: #334155;
}
