/**
 * Layer 70 - Analytics Dashboard Styles
 * Premium styling for analytics visualization
 */

/* ========== DASHBOARD PAGE LAYOUT ========== */
.analytics-dashboard-page {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    min-height: 100vh;
    color: var(--color-light, #f8fafc);
}

.dashboard-header {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.dashboard-main {
    padding: 2rem 0;
}

/* ========== SECTIONS ========== */
.metrics-panel,
.session-info,
.heatmap-section,
.timeline-section,
.performance-section,
.history-section {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.metrics-panel h2,
.session-info h2,
.heatmap-section h2,
.timeline-section h2,
.performance-section h2,
.history-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    color: #f8fafc;
}

/* ========== METRICS GRID ========== */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.metric-card {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.1), rgba(167, 139, 250, 0.1));
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(96, 165, 250, 0.2);
    border-color: rgba(96, 165, 250, 0.4);
}

.metric-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #60a5fa;
    margin: 0.5rem 0;
}

.metric-label {
    font-size: 0.875rem;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ========== SESSION INFO ========== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
}

.info-label {
    font-weight: 600;
    color: #94a3b8;
}

.info-value {
    color: #f8fafc;
    font-family: monospace;
    font-size: 0.875rem;
}

/* ========== DATA TABLES ========== */
.data-table {
    overflow-x: auto;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: rgba(96, 165, 250, 0.1);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #60a5fa;
    border-bottom: 2px solid rgba(96, 165, 250, 0.3);
}

.data-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
}

.data-table tbody tr:hover {
    background: rgba(96, 165, 250, 0.05);
}

.no-data {
    text-align: center;
    color: #64748b;
    font-style: italic;
    padding: 2rem !important;
}

/* ========== TIMELINE ========== */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #60a5fa, #a78bfa);
}

.timeline-item {
    position: relative;
    padding: 1rem 0 1rem 1.5rem;
    margin-bottom: 1rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.5rem;
    top: 1.25rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #60a5fa;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.2);
}

.timeline-time {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 0.25rem;
}

.timeline-type {
    font-weight: 600;
    color: #60a5fa;
    margin-bottom: 0.5rem;
    text-transform: capitalize;
}

.timeline-details {
    font-size: 0.875rem;
    color: #cbd5e1;
    font-family: monospace;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem;
    border-radius: 0.25rem;
}

/* ========== PERFORMANCE BREAKDOWN ========== */
.performance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.perf-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    padding: 1.25rem;
}

.perf-label {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.perf-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #60a5fa;
    margin-bottom: 0.75rem;
}

.perf-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.perf-fill {
    height: 100%;
    background: linear-gradient(90deg, #60a5fa, #a78bfa);
    border-radius: 4px;
    transition: width 0.5s ease;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

/* ========== SESSION HISTORY ========== */
.history-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.session-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.session-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(96, 165, 250, 0.3);
    transform: translateX(4px);
}

.session-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.session-header strong {
    color: #60a5fa;
    font-size: 0.875rem;
}

.session-header span {
    color: #94a3b8;
    font-size: 0.75rem;
}

.session-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.session-stats span {
    color: #cbd5e1;
    font-size: 0.875rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .dashboard-header h1 {
        font-size: 1.5rem;
    }

    .dashboard-actions {
        flex-direction: column;
    }

    .metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .metric-value {
        font-size: 2rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .performance-grid {
        grid-template-columns: 1fr;
    }

    .session-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-item {
        padding-left: 1rem;
    }
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.metric-card,
.info-item,
.timeline-item,
.perf-card,
.session-card {
    animation: fadeIn 0.5s ease-out;
}

/* ========== UTILITY CLASSES ========== */
.text-gradient {
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========== DARK MODE ADJUSTMENTS ========== */
@media (prefers-color-scheme: dark) {
    .analytics-dashboard-page {
        background: linear-gradient(135deg, #0a0f1e 0%, #151d2f 100%);
    }
}