.check-data-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.check-data-legend {
    display: flex;
    gap: 20px;
    align-items: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.85rem;
    color: #555;
}

.legend-swatch {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    flex-shrink: 0;
}

.legend-swatch.complete  { background: #22c55e; }
.legend-swatch.partial   { background: #f59e0b; }
.legend-swatch.empty     { background: #ef4444; }
.legend-swatch.unknown   { background: #d1d5db; }

/* Grid table */
#coverageGrid {
    width: 100%;
}

.cd-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 5px;
    table-layout: fixed;
}

.cd-th-year,
.cd-td-year {
    width: 44px;
    text-align: right;
    padding-right: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}

.cd-th-month {
    font-size: 0.78rem;
    color: #888;
    text-align: center;
    font-weight: 500;
    padding-bottom: 4px;
}

.cd-cell {
    height: 42px;
    border-radius: 6px;
    cursor: default;
    transition: opacity 0.15s, transform 0.1s;
}

.cd-cell.cell-complete,
.cd-cell.cell-partial,
.cd-cell.cell-empty,
.cd-cell.cell-unknown {
    cursor: pointer;
}

.cd-cell.cell-complete:hover,
.cd-cell.cell-partial:hover,
.cd-cell.cell-empty:hover,
.cd-cell.cell-unknown:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.cell-complete     { background: #22c55e; }
.cell-partial      { background: #f59e0b; }
.cell-empty        { background: #ef4444; }
.cell-unknown      { background: #d1d5db; }
.cell-future       { background: #f3f4f6; border: 1px solid #e5e7eb; }
.cell-before-range { background: transparent; border: 1px dashed #e5e7eb; }

/* Loading skeleton */
.cell-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite;
    cursor: default;
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Flagged cells (partial / no data) get a subtle marker hinting there's detail on hover */
.cd-cell-flagged {
    position: relative;
}

.cd-cell-flagged::after {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
}

/* Hover flyout showing which specific days/sources are missing data */
.cd-flyout {
    position: absolute;
    z-index: 1000;
    max-width: 280px;
    background: #1f2937;
    color: #f9fafb;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.8rem;
    line-height: 1.4;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.12s ease;
}

.cd-flyout.visible {
    opacity: 1;
    visibility: visible;
}

.cd-flyout-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.cd-flyout-list {
    list-style: none;
    margin: 0;
    padding: 0;
    color: #d1d5db;
}

.cd-flyout-list li {
    margin-top: 2px;
}

.cd-flyout-list li strong {
    color: #f9fafb;
}
