/**
 * Analytics Dashboard Styles
 * Dark theme styling for Issues Analytics
 */

.analytics-content {
    padding: 20px;
    background: #0f1419;
    color: #cbd5e0;
    min-height: 100vh;
}

/* ==================== Analytics Header ==================== */

.analytics-header {
    margin-bottom: 30px;
}

.analytics-header h2 {
    color: #10b981;
    font-size: 28px;
    margin-bottom: 20px;
    font-weight: 700;
}

.analytics-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.summary-card {
    background: linear-gradient(135deg, #1a1f28 0%, #252d36 100%);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    border: 1px solid #2d3748;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.summary-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.2);
}

.summary-value {
    font-size: 42px;
    font-weight: 800;
    color: #10b981;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.summary-label {
    font-size: 14px;
    color: #9ca3af;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==================== Dashboard Grid ==================== */

.analytics-grid {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.analytics-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.analytics-row:has(.full-width) {
    grid-template-columns: 1fr;
}

/* ==================== Chart Cards ==================== */

.chart-card {
    background: #1a1f28;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #2d3748;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.2s;
}

.chart-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.chart-card h3 {
    color: #10b981;
    font-size: 18px;
    margin: 0 0 20px 0;
    font-weight: 700;
    border-bottom: 2px solid #2d3748;
    padding-bottom: 12px;
}

.chart-card.wide {
    grid-column: span 1;
}

.chart-card.full-width {
    grid-column: span 2;
}

.chart-card canvas {
    max-height: 400px;
}

/* ==================== Player Heatmap ==================== */

#playerHeatmapContainer {
    overflow-x: auto;
}

.heatmap-grid {
    display: table;
    border-collapse: collapse;
    width: 100%;
    min-width: 500px;
}

.heatmap-row {
    display: table-row;
}

.heatmap-cell {
    display: table-cell;
    padding: 16px;
    text-align: center;
    border: 1px solid #2d3748;
    font-weight: 600;
    transition: transform 0.2s, background-color 0.2s;
}

.heatmap-cell.corner {
    background: #0f1419;
    border: none;
}

.heatmap-cell.header-cell {
    background: #252d36;
    color: #10b981;
    font-size: 14px;
    font-weight: 700;
}

.heatmap-cell.row-label {
    background: #252d36;
    color: #60a5fa;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
}

.heatmap-cell.data-cell {
    font-size: 16px;
    cursor: pointer;
    min-width: 80px;
    height: 60px;
    position: relative;
}

.heatmap-cell.data-cell:hover {
    transform: scale(1.1);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.heatmap-cell.data-cell:empty::after {
    content: '—';
    color: #4a5568;
    font-size: 12px;
}

/* ==================== Stats Tables ==================== */

.stats-table-card {
    background: #1a1f28;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #2d3748;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.stats-table-card h3 {
    color: #10b981;
    font-size: 18px;
    margin: 0 0 20px 0;
    font-weight: 700;
    border-bottom: 2px solid #2d3748;
    padding-bottom: 12px;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.stats-table thead tr {
    background: #252d36;
}

.stats-table th {
    padding: 12px 16px;
    text-align: left;
    color: #10b981;
    font-weight: 700;
    border-bottom: 2px solid #2d3748;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-table tbody tr {
    border-bottom: 1px solid #2d3748;
    transition: background-color 0.2s;
}

.stats-table tbody tr:hover {
    background: #252d36;
}

.stats-table td {
    padding: 12px 16px;
    color: #cbd5e0;
}

.stats-table .player-name,
.stats-table .category-name {
    font-weight: 700;
    color: #60a5fa;
    font-size: 14px;
}

.stats-table .active-count {
    color: #ef4444;
    font-weight: 600;
}

.stats-table .resolved-count {
    color: #10b981;
    font-weight: 600;
}

.stats-table .critical-count {
    color: #dc2626;
    font-weight: 700;
}

/* ==================== Progress Bar ==================== */

.progress-bar {
    position: relative;
    width: 100%;
    height: 24px;
    background: #2d3748;
    border-radius: 12px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    border-radius: 12px;
    transition: width 0.5s ease;
}

.progress-bar span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* ==================== Loading Message ==================== */

.analytics-content .loading-message {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #9ca3af;
}

/* ==================== Responsive Design ==================== */

@media (max-width: 1400px) {
    .analytics-row {
        grid-template-columns: 1fr;
    }

    .chart-card.wide,
    .chart-card.full-width {
        grid-column: span 1;
    }

    .analytics-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .analytics-content {
        padding: 15px;
    }

    .analytics-header h2 {
        font-size: 22px;
    }

    .analytics-summary {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .summary-card {
        padding: 18px;
    }

    .summary-value {
        font-size: 32px;
    }

    .chart-card {
        padding: 18px;
    }

    .chart-card h3 {
        font-size: 16px;
    }

    .chart-card canvas {
        max-height: 300px;
    }

    .analytics-grid {
        gap: 15px;
    }

    .heatmap-cell {
        padding: 10px;
        font-size: 12px;
    }

    .heatmap-cell.data-cell {
        font-size: 14px;
        min-width: 60px;
        height: 50px;
    }

    .stats-table {
        font-size: 11px;
    }

    .stats-table th,
    .stats-table td {
        padding: 8px 10px;
    }

    /* Analytics view containment + compaction */
    .analytics-content {
        padding: 8px;
        min-height: auto;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Force grid/flex children to be shrinkable so tracks
       don't blow out from intrinsic min-content (heatmap min-width:500px,
       pivot tables, wide charts, etc.) */
    .analytics-content,
    .detailed-analytics-section,
    .analytics-grid,
    .analytics-row,
    .breakdowns-grid,
    .analytics-summary,
    .analytics-row > *,
    .breakdowns-grid > *,
    .analytics-summary > *,
    .detailed-analytics-section > * {
        min-width: 0;
    }

    .detailed-analytics-section,
    .pivot-table-card,
    .chart-card,
    .breakdown-card,
    .summary-card,
    .stats-table-card {
        max-width: 100%;
        overflow: hidden;
    }

    .pivot-table-card {
        overflow: visible;
    }

    .analytics-header {
        margin-bottom: 14px;
    }

    .analytics-header h2 {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .analytics-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-top: 10px;
    }

    .summary-card {
        padding: 10px 8px;
        border-radius: 8px;
    }

    .summary-value {
        font-size: 22px;
        margin-bottom: 2px;
    }

    .summary-label {
        font-size: 10px;
        letter-spacing: 0.3px;
    }

    .detailed-analytics-section {
        padding: 10px;
        margin-bottom: 16px;
    }

    .detailed-analytics-section h2 {
        font-size: 15px;
        margin-bottom: 12px;
    }

    .pivot-table-card {
        padding: 8px;
        margin-bottom: 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .pivot-table-card h3 {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .pivot-table-card #pivotMatrixTitle {
        font-size: 13px !important;
    }

    /* Pivot view & entry-type filter buttons (inline-styled) */
    .pivot-matrix-view-btn,
    .entry-type-filter {
        padding: 4px 8px !important;
        font-size: 10px !important;
    }

    .chart-card {
        padding: 10px;
        border-radius: 8px;
    }

    .chart-card h3 {
        font-size: 13px;
        margin: 0 0 10px 0;
        padding-bottom: 6px;
    }

    .chart-card canvas {
        max-height: 240px;
    }

    .analytics-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .analytics-grid {
        gap: 10px;
    }

    .analytics-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .chart-card.wide,
    .chart-card.full-width {
        grid-column: 1 / -1;
        max-width: 100%;
    }

    .chart-card canvas {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Inner scroll for heatmap rather than page-level overflow */
    #playerHeatmapContainer {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .heatmap-grid {
        min-width: 0;
    }

    .stats-table-card {
        padding: 10px;
    }

    .stats-table-card h3 {
        font-size: 14px;
        margin-bottom: 8px;
        padding-bottom: 6px;
    }

    .breakdowns-grid {
        gap: 10px !important;
    }

    .breakdown-card {
        padding: 10px !important;
    }

    .breakdown-card h3 {
        font-size: 13px !important;
        margin-bottom: 8px !important;
    }

    .detailed-pivot-table {
        font-size: 11px;
    }

    .detailed-pivot-table th,
    .detailed-pivot-table td {
        padding: 6px 4px;
    }
}

/* ==================== Chart Specific Styles ==================== */

/* Make sure chart containers are responsive */
.chart-card>canvas {
    display: block;
    width: 100% !important;
    height: auto !important;
}

/* Timeline chart needs more height */
#timelineChart,
#resolutionTrendChart,
#tournamentChart {
    max-height: 350px !important;
}

/* Matrix chart needs square aspect ratio */
#categoryImpactMatrix {
    max-height: 500px !important;
}

/* Polar charts look better slightly smaller */
#phaseChart {
    max-height: 350px !important;
}

/* Doughnut charts compact */
#statusChart,
#impactChart {
    max-height: 300px !important;
}

/* Bar charts for categories */
#categoryChart {
    max-height: 400px !important;
}

/* Player chart stacked bars */
#playerChart {
    max-height: 350px !important;
}

/* ==================== Print Styles ==================== */

@media print {
    .analytics-content {
        background: white;
        color: black;
    }

    .chart-card,
    .summary-card,
    .stats-table-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .analytics-row {
        page-break-inside: avoid;
    }
}

/* ==================== Animations ==================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chart-card {
    animation: fadeIn 0.4s ease-out;
}

.summary-card {
    animation: fadeIn 0.3s ease-out;
}

/* Stagger animation for multiple cards */
.summary-card:nth-child(1) {
    animation-delay: 0s;
}

.summary-card:nth-child(2) {
    animation-delay: 0.1s;
}

.summary-card:nth-child(3) {
    animation-delay: 0.2s;
}

.summary-card:nth-child(4) {
    animation-delay: 0.3s;
}

/* ==================== Detailed Analytics Section ==================== */

.detailed-analytics-section {
    background: #1e2730;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 32px;
}

.detailed-analytics-section h2 {
    color: #4a9eff;
    font-size: 24px;
    margin-bottom: 24px;
}

.pivot-table-card {
    background: #252d36;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.pivot-table-card h3 {
    color: #e0e0e0;
    font-size: 18px;
    margin-bottom: 16px;
}

.detailed-pivot-table {
    width: 100%;
    border-collapse: collapse;
    color: #e0e0e0;
    overflow-x: auto;
    display: block;
}

.detailed-pivot-table thead,
.detailed-pivot-table tbody,
.detailed-pivot-table tfoot {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.detailed-pivot-table th,
.detailed-pivot-table td {
    padding: 12px;
    text-align: center;
    border: 1px solid #2d3842;
}

.detailed-pivot-table thead th {
    background: #2d3842;
    font-weight: 600;
    font-size: 13px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.pivot-header-player {
    text-align: left;
    min-width: 120px;
}

.pivot-header-category {
    min-width: 100px;
    font-size: 12px;
}

.pivot-player-name {
    background: #2d3842;
    text-align: left;
    font-weight: 600;
    color: #60a5fa;
}

.pivot-cell {
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    font-size: 14px;
}

.pivot-cell:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(74, 158, 255, 0.5);
}

.pivot-cell-selected {
    outline: 3px solid #4a9eff !important;
    outline-offset: -3px;
    box-shadow: 0 0 15px rgba(74, 158, 255, 0.8) !important;
    position: relative;
    z-index: 10;
}

.severity-critical {
    background: rgba(244, 67, 54, 0.3);
    color: #ff6b6b;
}

.severity-high {
    background: rgba(255, 152, 0, 0.3);
    color: #ffb74d;
}

.severity-medium {
    background: rgba(255, 235, 59, 0.3);
    color: #fff176;
}

.severity-low {
    background: rgba(76, 175, 80, 0.3);
    color: #81c784;
}

.severity-none {
    background: transparent;
    color: #3d4852;
}

/* Improvement gradient classes (green gradients) */
.improvement-very-high {
    background: rgba(16, 185, 129, 0.4);
    color: #34d399;
}

.improvement-high {
    background: rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.improvement-medium {
    background: rgba(16, 185, 129, 0.2);
    color: #a7f3d0;
}

.improvement-low {
    background: rgba(16, 185, 129, 0.15);
    color: #d1fae5;
}

.improvement-none {
    background: transparent;
    color: #3d4852;
}

.pivot-total {
    background: #2d3842;
    font-weight: 700;
}

/* Conditional formatting for Total column */
.pivot-total.total-none {
    background: #1e2730;
    color: #6b7280;
}

.pivot-total.total-low {
    background: rgba(129, 199, 132, 0.2);
    color: #81c784;
}

.pivot-total.total-medium {
    background: rgba(255, 241, 118, 0.2);
    color: #fff176;
}

.pivot-total.total-high {
    background: rgba(255, 183, 77, 0.2);
    color: #ffb74d;
}

.pivot-total.total-very-high {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
}

/* Conditional formatting for Improvement Total column (green gradients) */
.pivot-total.improvement-total-none {
    background: #1e2730;
    color: #6b7280;
}

.pivot-total.improvement-total-low {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
}

.pivot-total.improvement-total-medium {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.pivot-total.improvement-total-high {
    background: rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.pivot-total.improvement-total-very-high {
    background: rgba(16, 185, 129, 0.4);
    color: #059669;
}

.detailed-pivot-table tfoot th {
    background: #2d3842;
    font-weight: 700;
}

/* Pivot Cell Details */
#pivotCellDetailsContainer {
    margin-top: 16px;
}

.pivot-details-box {
    background: #1e2730;
    border-radius: 6px;
    padding: 16px;
    border-left: 4px solid #4a9eff;
}

.pivot-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.pivot-details-box h4 {
    color: #4a9eff;
    margin: 0;
    font-size: 16px;
}

.pivot-close-btn {
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.pivot-close-btn:hover {
    background: #b91c1c;
}

.pivot-details-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pivot-detail-item {
    background: #252d36;
    border-radius: 4px;
    padding: 12px;
}

.pivot-detail-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
}

.detail-time {
    color: #4caf50;
    font-weight: 600;
    font-family: monospace;
    font-size: 14px;
}

.detail-impact {
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.detail-impact.critical {
    background: rgba(244, 67, 54, 0.2);
    color: #ff6b6b;
}

.detail-impact.high {
    background: rgba(255, 152, 0, 0.2);
    color: #ffb74d;
}

.detail-impact.medium {
    background: rgba(255, 235, 59, 0.2);
    color: #fff176;
}

.detail-impact.low {
    background: rgba(76, 175, 80, 0.2);
    color: #81c784;
}

.detail-category {
    font-size: 12px;
    color: #10b981;
    font-weight: 600;
    padding: 3px 8px;
    background: rgba(16, 185, 129, 0.15);
    border-radius: 4px;
}

.detail-match {
    font-size: 12px;
    color: #9e9e9e;
}

.detail-tournament {
    font-size: 12px;
    color: #8b5cf6;
    font-weight: 600;
    padding: 3px 8px;
    background: rgba(139, 92, 246, 0.15);
    border-radius: 4px;
}

.detail-description {
    color: #e0e0e0;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.pivot-detail-screenshots {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.pivot-screenshot {
    width: 600px;
    height: auto;
    max-height: 450px;
    object-fit: contain;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s;
    border: 2px solid #374151;
}

.pivot-screenshot:hover {
    transform: scale(1.02);
    border-color: #60a5fa;
}

/* Breakdowns Grid */
.breakdowns-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.breakdown-card {
    background: #252d36;
    border-radius: 8px;
    padding: 20px;
}

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

.breakdown-card h3 {
    color: #e0e0e0;
    font-size: 16px;
    margin-bottom: 16px;
}

/* Timeline Distribution Grid */
.tg-wrapper {
    display: flex;
    flex-direction: column;
}

.tg-header-row,
.tg-row {
    display: grid;
    grid-template-columns: 140px 10fr 10fr 15fr 25fr;
}

.tg-header-row {
    margin-bottom: 4px;
}

.tg-spacer {
    /* empty label-width spacer */
}

.tg-phase-hdr {
    font-size: 11px;
    font-weight: 600;
    color: #60a5fa;
    text-align: center;
    text-transform: uppercase;
    padding: 5px 4px 8px;
    border-bottom: 2px solid #2d3842;
    border-right: 1px solid #1e293b;
}
.tg-phase-hdr:last-child { border-right: none; }

.tg-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 280px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}
.tg-body::-webkit-scrollbar { width: 6px; }
.tg-body::-webkit-scrollbar-track { background: #1e2730; border-radius: 3px; }
.tg-body::-webkit-scrollbar-thumb { background: #374151; border-radius: 3px; }
.tg-body::-webkit-scrollbar-thumb:hover { background: #4b5563; }

.tg-row {
    min-height: 38px;
    align-items: stretch;
}

.tg-label {
    font-size: 12px;
    font-weight: 600;
    color: #9e9e9e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding-right: 8px;
}
.tg-label:hover { color: #e0e0e0; }

.tg-cell {
    position: relative;
    min-height: 0;
    background: #141e2b;
    border-right: 1px solid #2d3842;
    overflow: hidden;
}
.tg-cell:last-child { border-right: 1px solid #1a2535; }

.tg-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    transition: transform 0.15s ease;
    z-index: 1;
}
.tg-dot:hover { transform: translateY(-50%) scale(1.7); z-index: 2; }
.tg-dot.critical { background: #ef4444; box-shadow: 0 0 6px rgba(239,68,68,0.7); }
.tg-dot.high     { background: #f97316; box-shadow: 0 0 6px rgba(249,115,22,0.7); }
.tg-dot.medium   { background: #eab308; box-shadow: 0 0 6px rgba(234,179,8,0.7); }
.tg-dot.low      { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,0.7); }

/* Breakdown Bars */
.breakdown-bars-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.breakdown-bar-item {
    display: grid;
    grid-template-columns: 100px 1fr 100px;
    gap: 12px;
    align-items: center;
    transition: background 0.2s ease;
    padding: 4px 8px;
    margin: -4px -8px;
    border-radius: 4px;
}

.breakdown-bar-item:hover {
    background: rgba(96, 165, 250, 0.1);
}

.breakdown-bar-item.active-filter {
    background: rgba(96, 165, 250, 0.2);
    border: 1px solid #60a5fa;
}

.breakdown-bar-label {
    font-size: 13px;
    font-weight: 600;
    color: #e0e0e0;
}

.breakdown-bar-label.critical {
    color: #ff6b6b;
}

.breakdown-bar-label.high {
    color: #ffb74d;
}

.breakdown-bar-label.medium {
    color: #fff176;
}

.breakdown-bar-label.low {
    color: #81c784;
}

.breakdown-bar-label.tournament-label {
    color: #8b5cf6;
    max-width: 120px;
    overflow: visible;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.3;
}

.breakdown-bar-container {
    background: #1e2730;
    border-radius: 4px;
    height: 24px;
    overflow: hidden;
    border: 1px solid #2d3842;
}

.breakdown-bar-fill {
    height: 100%;
    background: #4a9eff;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.breakdown-bar-fill-critical {
    background: #ff6b6b;
}

.breakdown-bar-fill-high {
    background: #ffb74d;
}

.breakdown-bar-fill-medium {
    background: #fff176;
}

.breakdown-bar-fill-low {
    background: #81c784;
}

.breakdown-bar-fill-tournament {
    background: linear-gradient(90deg, #8b5cf6 0%, #a78bfa 100%);
}

.breakdown-bar-value {
    font-size: 13px;
    color: #9e9e9e;
    text-align: right;
}

.no-data {
    text-align: center;
    padding: 20px;
    color: #9e9e9e;
    font-style: italic;
}

/* Responsive adjustments for detailed analytics */
@media (max-width: 768px) {
    .breakdowns-grid {
        grid-template-columns: 1fr;
    }

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

    .detailed-pivot-table {
        font-size: 12px;
    }

    .detailed-pivot-table th,
    .detailed-pivot-table td {
        padding: 8px 4px;
    }

    .breakdown-bar-item {
        grid-template-columns: 80px 1fr 80px;
        gap: 8px;
    }

    .timeline-match-label {
        min-width: 80px;
        font-size: 11px;
    }
}