@media (prefers-color-scheme: dark) {
    body.dark-mode {
        --background: #0F172A;
        --surface: #172033;
        --surface-soft: #1D294D;
        --text: #F8FAFC;
        --muted: #AAB4C7;
        --border: rgba(255, 255, 255, .12);
        --focus: rgba(226, 29, 61, .22);
    }
}

.empty-state,
.loading-state,
.error-state {
    display: grid;
    place-items: center;
    gap: 10px;
    min-height: 180px;
    padding: 24px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--muted);
    text-align: center;
}

.empty-state strong,
.loading-state strong,
.error-state strong {
    color: var(--primary);
    font-size: 18px;
}

.skeleton {
    position: relative;
    overflow: hidden;
    min-height: 18px;
    border-radius: var(--radius-sm);
    background: #EDF1F7;
}

.skeleton-short {
    width: 72px;
}

.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent);
    animation: skeleton-wave 1.2s infinite;
}

.tooltip {
    position: relative;
}

.tooltip:hover::after,
.tooltip:focus-visible::after {
    content: attr(aria-label);
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    z-index: 70;
    max-width: 220px;
    padding: 7px 9px;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

.pagination a,
.pagination span {
    min-width: 40px;
    min-height: 40px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--secondary);
    font-weight: 850;
}

.pagination .current {
    background: var(--primary);
    color: #fff;
}

@keyframes skeleton-wave {
    to {
        transform: translateX(100%);
    }
}
