.pagination-shell {
    align-items: center;
    background: var(--surface, #ffffff);
    min-width: 0;
    border: 1px solid var(--border-soft, #e5e9ef);
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
    display: grid;
    gap: 0.75rem 1rem;
    grid-template-columns: minmax(0, 1fr) auto auto;
    margin-top: 1rem;
    padding: 0.7rem 0.85rem;
}

.pagination-summary {
    color: var(--text-muted, #6b7280);
    font-size: 0.8rem;
    line-height: 1.4;
}

.pagination-summary strong {
    color: var(--text-main, #1f2937);
    font-weight: 700;
}

.pagination-summary-label {
    margin-right: 0.2rem;
}


.pagination-shell .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    min-width: 0;
}

.pagination-shell .page-item {
    margin: 0;
}

.pagination-shell .page-link {
    align-items: center;
    background: #fff;
    border: 1px solid transparent;
    border-radius: 8px !important;
    color: var(--text-main, #1f2937);
    display: inline-flex;
    font-size: 0.8rem;
    font-weight: 700;
    justify-content: center;
    line-height: 1;
    min-height: 36px;
    min-width: 36px;
    padding: 0.5rem 0.65rem;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.pagination-shell .page-link:hover {
    background: var(--brand-yellow-soft, #fff8dc);
    border-color: #f0de80;
    color: var(--text-main, #1f2937);
}

.pagination-shell .page-link:focus-visible {
    border-color: var(--brand-blue, #3483fa);
    box-shadow: 0 0 0 0.2rem rgba(52, 131, 250, 0.2);
    outline: none;
    position: relative;
    z-index: 1;
}

.pagination-shell .page-item.active .page-link {
    background: var(--brand-blue, #3483fa);
    border-color: var(--brand-blue, #3483fa);
    color: #fff;
}

.pagination-shell .page-item.disabled .page-link {
    background: transparent;
    color: #a6adb8;
    opacity: 1;
}

.pagination-shell .pagination-icon {
    display: block;
    fill: currentColor;
    height: 1rem;
    width: 1rem;
}

.pagination-shell .pagination-icon-link {
    color: var(--brand-blue, #3483fa);
}

.pagination-shell .pagination-page-ellipsis {
    min-width: 28px;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

.pagination-controls {
    align-items: center;
    display: flex;
    gap: 0.55rem 0.9rem;
    justify-content: flex-end;
    justify-self: end;
    min-width: max-content;
}

.pagination-jump-form {
    align-items: center;
    color: var(--text-muted, #6b7280);
    display: flex;
    font-size: 0.8rem;
    gap: 0.4rem;
    flex-wrap: nowrap;
    white-space: nowrap;
    width: max-content;
}

.pagination-jump-form label {
    color: var(--text-main, #1f2937);
    font-weight: 600;
    margin-bottom: 0;
}

.pagination-jump-form .form-control {
    border-color: var(--border-soft, #e5e9ef);
    border-radius: 8px;
    color: var(--text-main, #1f2937);
    display: inline-block;
    flex: 0 0 auto;
    height: 36px;
    min-width: 4.2rem;
    padding: 0.25rem 0.55rem;
    text-align: center;
    width: 4.2rem;
}

.pagination-jump-form .form-control:focus {
    border-color: var(--brand-blue, #3483fa);
    box-shadow: 0 0 0 0.2rem rgba(52, 131, 250, 0.15);
}

.pagination-jump-button {
    align-items: center;
    background: var(--brand-blue, #3483fa);
    border: 1px solid var(--brand-blue, #3483fa);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 700;
    justify-content: center;
    min-height: 36px;
    padding: 0.45rem 0.75rem;
    transition: background-color 150ms ease, border-color 150ms ease;
}

.pagination-jump-button:hover {
    background: #2a6cd1;
    border-color: #2a6cd1;
}

.pagination-jump-button:focus-visible {
    box-shadow: 0 0 0 0.2rem rgba(52, 131, 250, 0.2);
    outline: none;
}

@media (max-width: 767.98px) {
    .pagination-shell {
        grid-template-columns: 1fr auto;
    }

    .pagination-summary,
    .pagination-controls {
        grid-column: 1 / -1;
    }

    .pagination-controls {
        justify-self: stretch;
        min-width: 0;
    }

    .pagination-shell > .pagination {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }
}

@media (max-width: 480px) {
    .pagination-shell {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .pagination-shell > .pagination {
        justify-content: center;
    }

    .pagination-shell .page-link {
        min-height: 40px;
        min-width: 40px;
    }

    .pagination-controls {
        align-items: stretch;
        flex-direction: column;
        gap: 0.65rem;
    }

    .pagination-jump-form {
        flex-wrap: wrap;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pagination-shell .page-link {
        transition: none;
    }
}
