/* Data View Specific Styles */




.page-nav {
    display: flex;
    gap: 15px;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.data-dashboard {
    display: none;
}

.data-controls {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: end;
}

.search-input {
    padding: 10px 15px;
    border: 2px solid #e0e6ff;
    border-radius: 8px;
    background: white;
    color: #333;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    min-width: 250px;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.data-summary {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: space-around;
}

.summary-item {
    text-align: center;
}

.summary-label {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.summary-value {
    display: block;
    color: #333;
    font-size: 1.5rem;
    font-weight: bold;
}

.data-table-container {
    background: white;
    border-radius: 15px;
    padding: 0;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    overflow-x: auto;
    overflow-y: visible;
    max-width: 100%;
    position: relative;
}

/* Scroll indicator shadow */
.data-table-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 8px; /* Account for scrollbar height */
    width: 20px;
    background: linear-gradient(to left, rgba(0,0,0,0.1), transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.data-table-container.has-scroll::after {
    opacity: 1;
}

/* Custom scrollbar styling */
.data-table-container::-webkit-scrollbar {
    height: 8px;
}

.data-table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 0 15px 15px;
}

.data-table-container::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.data-table-container::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}

.data-table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: 600;
    padding: 15px 12px;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 10;
    cursor: pointer;
    user-select: none;
    transition: background 0.3s ease;
    min-width: 120px;
    white-space: nowrap;
}

.data-table th:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a42a0);
}

.data-table th.sortable {
    position: relative;
    padding-right: 25px;
}

.data-table th.sortable::after {
    content: '\f0dc';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
    font-size: 0.8rem;
}

.data-table th.sort-asc::after {
    content: '\f0de';
    opacity: 1;
}

.data-table th.sort-desc::after {
    content: '\f0dd';
    opacity: 1;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}

.data-table tr:nth-child(even) {
    background: #f8f9ff;
}

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

/* Column specific styling */
.data-table .col-date {
    min-width: 160px;
    font-family: monospace;
    font-size: 0.85rem;
    white-space: nowrap;
}

.data-table .col-duration {
    min-width: 100px;
    text-align: center;
    font-family: monospace;
    white-space: nowrap;
}

.data-table .col-number {
    min-width: 80px;
    text-align: right;
    font-family: monospace;
    white-space: nowrap;
}

.data-table .col-large-number {
    min-width: 100px;
    text-align: right;
    font-family: monospace;
    font-weight: 500;
    white-space: nowrap;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.pagination-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.pagination-btn:hover:not(:disabled) {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.pagination-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.pagination-info {
    color: #666;
    font-weight: 500;
}

/* Responsive design */
@media (max-width: 768px) {
    .data-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
.data-controls .control-group {
    width: 100%;
}

.control-btn {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.control-btn:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.column-toggle-panel {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border: 2px solid #e0e6ff;
}

.column-toggle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f2ff;
}

.column-toggle-header h4 {
    margin: 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}

.column-toggle-actions {
    display: flex;
    gap: 10px;
}

.toggle-action-btn {
    padding: 6px 12px;
    background: #f8f9ff;
    color: #667eea;
    border: 1px solid #e0e6ff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
}

.toggle-action-btn:hover {
    background: #e8f0fe;
    border-color: #667eea;
}

.column-toggle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
}

.column-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f8f9ff;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.column-checkbox-item:hover {
    background: #e8f0fe;
    border-color: #e0e6ff;
}

.column-checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.column-checkbox-item label {
    cursor: pointer;
    font-size: 0.9rem;
    color: #333;
    flex: 1;
    margin: 0;
}

.column-checkbox-item.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Scrollbar for column grid */
.column-toggle-grid::-webkit-scrollbar {
    width: 6px;
}

.column-toggle-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.column-toggle-grid::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 3px;
}

.column-toggle-grid::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}
    
    .search-input {
        min-width: 100%;
    }
    
    .data-summary {
        flex-direction: column;
        gap: 15px;
    }
    
    .data-table-container {
        overflow-x: auto;
    }
    
    .data-table {
        min-width: 800px;
    }
    
    .pagination {
        flex-direction: column;
        gap: 10px;
    }
    
    .column-toggle-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .column-toggle-actions {
        justify-content: center;
    }
    
    .column-toggle-grid {
        grid-template-columns: 1fr;
    }
    
    .time-analysis-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .insight-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Print styles for data view */
@media print {
    .data-controls,
    .pagination,
    .nav-link,
    .export-btn,
    .column-toggle-panel,
    .time-analysis-section {
        display: none !important;
    }
    
    .data-table-container {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
    
    .data-table th {
        background: #f5f5f5 !important;
        color: black !important;
        border: 1px solid #333 !important;
    }
    
    .data-table td {
        border: 1px solid #ccc !important;
        font-size: 8pt !important;
        padding: 6px !important;
    }
    
    .data-table tr:nth-child(even) {
        background: #f9f9f9 !important;
    }
}

/* Highlight search matches */
.highlight {
    background: yellow;
    font-weight: bold;
}

/* Time Analysis Section */
.time-analysis-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.time-analysis-header {
    text-align: center;
    margin-bottom: 25px;
}

.time-analysis-header h3 {
    color: #333;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.3rem;
}

.time-analysis-header p {
    color: #666;
    font-size: 0.95rem;
}

.time-analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

.time-chart-container {
    background: #f8f9ff;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #e0e6ff;
}

.time-chart-container h4 {
    margin-bottom: 15px;
    color: #333;
    text-align: center;
    font-size: 1.1rem;
}

.time-chart-container canvas {
    max-height: 250px !important;
    margin-bottom: 15px;
}

.best-times-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.time-badge {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.time-badge.top-performer {
    background: linear-gradient(135deg, #4caf50, #45a049);
}

.time-badge .metric {
    font-size: 0.75rem;
    opacity: 0.9;
}

.time-insights {
    background: #f0f2ff;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #e0e6ff;
    border-left: 4px solid #667eea;
}

.time-insights h4 {
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
}

.time-insights .insight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.insight-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.insight-item .insight-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.insight-item .insight-value {
    color: #667eea;
    font-weight: 500;
}

.insight-item .insight-description {
    color: #666;
    font-size: 0.9rem;
    margin-top: 5px;
}

.session-examples {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e6ff;
    max-height: 270px;
    overflow-y: auto;
    padding-right: 4px;
}

.session-examples::-webkit-scrollbar {
    width: 6px;
}

.session-examples::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.session-examples::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 3px;
}

.session-examples::-webkit-scrollbar-thumb:hover {
    background: #5a67d8;
}

/* Fade effect for scrollable content */
.session-examples::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(rgba(248, 249, 255, 0), rgba(248, 249, 255, 0.9));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.session-examples.has-scroll::after {
    opacity: 1;
}

.session-examples {
    position: relative;
}

.examples-header {
    font-size: 0.85rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 8px;
}

.session-example {
    margin-bottom: 8px;
    padding: 10px 12px;
    background: #f8f9ff;
    border-radius: 6px;
    border-left: 2px solid #667eea;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.session-example:last-child {
    margin-bottom: 0;
}

.session-rank {
    background: #667eea;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    flex-shrink: 0;
    margin-top: 2px;
}

.session-details {
    flex: 1;
    min-width: 0;
}

.session-date {
    font-size: 0.8rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.session-metrics {
    font-size: 0.75rem;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.metric-item {
    background: white;
    padding: 2px 6px;
    border-radius: 10px;
    border: 1px solid #e0e6ff;
    white-space: nowrap;
}

/* Growth trajectory section styling */
.growth-trajectory-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12), 0 4px 10px rgba(0,0,0,0.08);
    border: 2px solid #e9ecef;
    border-left: 6px solid #28a745;
    position: relative;
    overflow: hidden;
}

.growth-trajectory-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #28a745, #20c997, #17a2b8);
}

.growth-trajectory-header {
    margin-bottom: 30px;
    text-align: center;
    position: relative;
}

.growth-trajectory-header h3 {
    color: #28a745;
    margin: 0 0 15px 0;
    font-size: 1.8em;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(40, 167, 69, 0.1);
    position: relative;
}

.growth-trajectory-header h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 2px;
}

.growth-trajectory-header p {
    color: #6c757d;
    margin: 20px 0 0 0;
    line-height: 1.6;
    font-size: 1.05em;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.growth-metric-selector {
    margin: 20px 0 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.baseline-selector {
    margin: 15px 0 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 15px;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 10px;
    border: 2px solid rgba(40, 167, 69, 0.4);
    min-height: 60px;
}

.growth-metric-selector label {
    color: #495057;
    font-weight: 600;
    font-size: 1em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.growth-metric-selector label i {
    color: #28a745;
}

.growth-metric-dropdown {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 1em;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.growth-metric-dropdown:hover {
    border-color: #28a745;
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.1);
}

.growth-metric-dropdown:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.growth-metric-dropdown option {
    padding: 8px;
    color: #495057;
}

.baseline-selector label {
    color: #495057;
    font-weight: 600;
    font-size: 1em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.baseline-selector label i {
    color: #28a745;
}

.baseline-month-dropdown {
    background: white;
    border: 2px solid #28a745;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 1em;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.baseline-month-dropdown:hover {
    border-color: #28a745;
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.1);
}

.baseline-month-dropdown:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.baseline-month-dropdown option {
    padding: 8px;
    color: #495057;
}

.reset-baseline-btn {
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.reset-baseline-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.reset-baseline-btn:active {
    transform: translateY(0);
}

.growth-trajectory-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 20px;
}

.growth-metric-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    padding: 25px;
    border: 2px solid #e9ecef;
    border-left: 5px solid #28a745;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.growth-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12), 0 4px 10px rgba(0,0,0,0.08);
}

.growth-metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #28a745, #20c997);
}

.growth-metric-card h4 {
    color: #28a745;
    margin: 0 0 15px 0;
    font-size: 1.2em;
    font-weight: 600;
}

.growth-metric-value {
    font-size: 3em;
    font-weight: 800;
    color: #28a745;
    margin: 15px 0;
    text-align: center;
    text-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
    background: linear-gradient(135deg, #28a745, #20c997);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.growth-metric-description {
    color: #6c757d;
    font-size: 0.95em;
    line-height: 1.4;
    margin-bottom: 15px;
}

.growth-metric-details {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #e9ecef;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
    margin-top: 15px;
}

.growth-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
    padding: 5px 0;
    border-bottom: 1px solid #f1f3f4;
}

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

.growth-detail-label {
    font-weight: 500;
    color: #495057;
}

.growth-detail-value {
    font-weight: 600;
    color: #28a745;
}

.growth-progress-bar {
    background: linear-gradient(90deg, #e9ecef, #f8f9fa);
    border-radius: 12px;
    height: 12px;
    margin: 15px 0;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #dee2e6;
}

.growth-progress-fill {
    background: linear-gradient(90deg, #28a745, #20c997, #17a2b8);
    height: 100%;
    border-radius: 12px;
    transition: width 0.6s ease;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
    position: relative;
}

.growth-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.growth-progress-text {
    text-align: center;
    font-size: 0.95em;
    color: #495057;
    margin-top: 8px;
    font-weight: 500;
    background: linear-gradient(135deg, #28a745, #20c997);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.growth-chart-container {
    margin-top: 30px;
    background: white;
    border-radius: 12px;
    padding: 25px;
    border: 2px solid #e9ecef;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.growth-chart-container h4 {
    color: #28a745;
    margin: 0 0 20px 0;
    font-size: 1.3em;
    font-weight: 600;
    text-align: center;
}

.growth-chart-container canvas {
    max-width: 100%;
    height: 300px !important;
    max-height: 300px;
}

@media (max-width: 768px) {
    .growth-trajectory-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .growth-chart-container {
        padding: 20px;
    }
    
    .growth-chart-container canvas {
        height: 250px !important;
        max-height: 250px;
    }
}